"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
'\" t
.\" Automatically generated by Pandoc 3.1.3
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.TH "rclone" "1" "Nov 06, 2026" "User Manual" ""
.hy
.SH NAME
.PP
rclone - manage files on cloud storage
.SH SYNOPSIS
.IP
.nf
\f[C]
Usage:
rclone [flags]
rclone [command]
Available commands:
about Get quota information from the remote.
archive Perform an action on an archive.
authorize Remote authorization.
backend Run a backend-specific command.
bisync Perform bidirectional synchronization between two paths.
cat Concatenates any files and sends them to stdout.
check Checks the files in the source and destination match.
checksum Checks the files in the destination against a SUM file.
cleanup Clean up the remote if possible.
completion Output completion script for a given shell.
config Enter an interactive configuration session.
convmv Convert file and directory names in place.
copy Copy files from source to dest, skipping identical files.
copyto Copy files from source to dest, skipping identical files.
copyurl Copy the contents of the URL supplied content to dest:path.
cryptcheck Cryptcheck checks the integrity of an encrypted remote.
cryptdecode Cryptdecode returns unencrypted file names.
dedupe Interactively find duplicate filenames and delete/rename them.
delete Remove the files in path.
deletefile Remove a single file from remote.
gendocs Output markdown docs for rclone to the directory supplied.
gitannex Speaks with git-annex over stdin/stdout.
gui Open the web based GUI.
hashsum Produces a hashsum file for all the objects in the path.
help Show help for rclone commands, flags and backends.
index Write static directory listings into a remote.
link Generate public link to file/folder.
listremotes List all the remotes in the config file and defined in environment variables.
ls List the objects in the path with size and path.
lsd List all directories/containers/buckets in the path.
lsf List directories and objects in remote:path formatted for parsing.
lsjson List directories and objects in the path in JSON format.
lsl List the objects in path with modification time, size and path.
md5sum Produces an md5sum file for all the objects in the path.
mkdir Make the path if it doesn\[aq]t already exist.
mount Mount the remote as file system on a mountpoint.
move Move files from source to dest.
moveto Move file or directory from source to dest.
ncdu Explore a remote with a text based user interface.
nfsmount Mount the remote as file system on a mountpoint.
obscure Obscure password for use in the rclone config file.
purge Remove the path and all of its contents.
rc Run a command against a running rclone.
rcat Copies standard input to file on remote.
rcd Run rclone listening to remote control commands only.
rmdir Remove the empty directory at path.
rmdirs Remove empty directories under the path.
selfupdate Update the rclone binary.
serve Serve a remote over a protocol.
settier Changes storage class/tier of objects in remote.
sha1sum Produces an sha1sum file for all the objects in the path.
size Prints the total size and number of objects in remote:path.
sync Make source and dest identical, modifying destination only.
test Run a test command
touch Create new file or change file modification time.
tree List the contents of the remote in a tree like fashion.
version Show the version number.
Use \[dq]rclone [command] --help\[dq] for more information about a command.
Use \[dq]rclone help flags\[dq] for to see the global flags.
Use \[dq]rclone help backends\[dq] for a list of supported services.
\f[R]
.fi
.SH Rclone syncs your files to cloud storage
.PP
.IP \[bu] 2
About rclone
.IP \[bu] 2
What can rclone do for you?
.IP \[bu] 2
What features does rclone have?
.IP \[bu] 2
What providers does rclone support?
.IP \[bu] 2
Download (https://rclone.org/downloads/)
.IP \[bu] 2
Install (https://rclone.org/install/)
.IP \[bu] 2
Donate. (https://rclone.org/donate/)
.SS About rclone
.PP
Rclone is a command-line program to manage files on cloud storage.
It is a feature-rich alternative to cloud vendors\[aq] web storage
interfaces.
Over 70 cloud storage products support rclone including S3 object
stores, business & consumer file storage services, as well as standard
transfer protocols.
.PP
Rclone has powerful cloud equivalents to the unix commands rsync, cp,
mv, mount, ls, ncdu, tree, rm, and cat.
Rclone\[aq]s familiar syntax includes shell pipeline support, and
\f[V]--dry-run\f[R] protection.
It is used at the command line, in scripts or via its API.
.PP
Users call rclone \f[I]\[dq]The Swiss army knife of cloud
storage\[dq]\f[R], and \f[I]\[dq]Technology indistinguishable from
magic\[dq]\f[R].
.PP
Rclone really looks after your data.
It preserves timestamps and verifies checksums at all times.
Transfers over limited bandwidth; intermittent connections, or subject
to quota can be restarted, from the last good file transferred.
You can check (https://rclone.org/commands/rclone_check/) the integrity
of your files.
Where possible, rclone employs server-side transfers to minimise local
bandwidth use and transfers from one provider to another without using
local disk.
.PP
Virtual backends wrap local and cloud file systems to apply
encryption (https://rclone.org/crypt/),
compression (https://rclone.org/compress/),
chunking (https://rclone.org/chunker/),
hashing (https://rclone.org/hasher/) and
joining (https://rclone.org/union/).
.PP
Rclone mounts (https://rclone.org/commands/rclone_mount/) any local,
cloud or virtual filesystem as a disk on Windows, macOS, linux and
FreeBSD, and also serves these over
SFTP (https://rclone.org/commands/rclone_serve_sftp/),
HTTP (https://rclone.org/commands/rclone_serve_http/),
WebDAV (https://rclone.org/commands/rclone_serve_webdav/),
FTP (https://rclone.org/commands/rclone_serve_ftp/) and
DLNA (https://rclone.org/commands/rclone_serve_dlna/).
.PP
Rclone is mature, open-source software originally inspired by rsync and
written in Go (https://golang.org).
The friendly support community is familiar with varied use cases.
Official Ubuntu, Debian, Fedora, Brew and Chocolatey repos.
include rclone.
For the latest version downloading from
rclone.org (https://rclone.org/downloads/) is recommended.
.PP
Rclone is widely used on Linux, Windows and Mac.
Third-party developers create innovative backup, restore, GUI and
business process solutions using the rclone command line or API.
.PP
Rclone does the heavy lifting of communicating with cloud storage.
.SS What can rclone do for you?
.PP
Rclone helps you:
.IP \[bu] 2
Backup (and encrypt) files to cloud storage
.IP \[bu] 2
Restore (and decrypt) files from cloud storage
.IP \[bu] 2
Mirror cloud data to other cloud services or locally
.IP \[bu] 2
Migrate data to the cloud, or between cloud storage vendors
.IP \[bu] 2
Mount multiple, encrypted, cached or diverse cloud storage as a disk
.IP \[bu] 2
Analyse and account for data held on cloud storage using
lsf (https://rclone.org/commands/rclone_lsf/),
ljson (https://rclone.org/commands/rclone_lsjson/),
size (https://rclone.org/commands/rclone_size/),
ncdu (https://rclone.org/commands/rclone_ncdu/)
.IP \[bu] 2
Union (https://rclone.org/union/) file systems together to present
multiple local and/or cloud file systems as one
.SS Features
.IP \[bu] 2
Transfers
.RS 2
.IP \[bu] 2
MD5, SHA1 hashes are checked at all times for file integrity
.IP \[bu] 2
Timestamps are preserved on files
.IP \[bu] 2
Operations can be restarted at any time
.IP \[bu] 2
Can be to and from network, e.g.
two different cloud providers
.IP \[bu] 2
Can use multi-threaded downloads to local disk
.RE
.IP \[bu] 2
Copy (https://rclone.org/commands/rclone_copy/) new or changed files to
cloud storage
.IP \[bu] 2
Sync (https://rclone.org/commands/rclone_sync/) (one way) to make a
directory identical
.IP \[bu] 2
Bisync (https://rclone.org/bisync/) (two way) to keep two directories in
sync bidirectionally
.IP \[bu] 2
Move (https://rclone.org/commands/rclone_move/) files to cloud storage
deleting the local after verification
.IP \[bu] 2
Check (https://rclone.org/commands/rclone_check/) hashes and for
missing/extra files
.IP \[bu] 2
Mount (https://rclone.org/commands/rclone_mount/) your cloud storage as
a network disk
.IP \[bu] 2
Serve (https://rclone.org/commands/rclone_serve/) local or remote files
over
HTTP (https://rclone.org/commands/rclone_serve_http/)/WebDav (https://rclone.org/commands/rclone_serve_webdav/)/FTP (https://rclone.org/commands/rclone_serve_ftp/)/SFTP (https://rclone.org/commands/rclone_serve_sftp/)/DLNA (https://rclone.org/commands/rclone_serve_dlna/)
.IP \[bu] 2
Experimental Web based GUI (https://rclone.org/gui/)
.SS Supported providers
.PP
(There are many others, built on standard protocols such as WebDAV or
S3, that work out of the box.)
.IP \[bu] 2
1Fichier
.IP \[bu] 2
Akamai Netstorage
.IP \[bu] 2
Alibaba Cloud (Aliyun) Object Storage System (OSS)
.IP \[bu] 2
Amazon S3
.IP \[bu] 2
Autonomys Auto Drive
.IP \[bu] 2
Bizfly Cloud Simple Storage
.IP \[bu] 2
Backblaze B2
.IP \[bu] 2
Box
.IP \[bu] 2
Ceph
.IP \[bu] 2
China Mobile Ecloud Elastic Object Storage (EOS)
.IP \[bu] 2
Arvan Cloud Object Storage (AOS)
.IP \[bu] 2
Citrix ShareFile
.IP \[bu] 2
Clever Cloud Cellar
.IP \[bu] 2
Cloudflare R2
.IP \[bu] 2
Cloudinary
.IP \[bu] 2
Cubbit DS3
.IP \[bu] 2
DigitalOcean Spaces
.IP \[bu] 2
Digi Storage
.IP \[bu] 2
dosya.dev
.IP \[bu] 2
Dreamhost
.IP \[bu] 2
Drime
.IP \[bu] 2
Dropbox
.IP \[bu] 2
Enterprise File Fabric
.IP \[bu] 2
Exaba
.IP \[bu] 2
Fastly Object Storage
.IP \[bu] 2
Fastmail Files
.IP \[bu] 2
FileLu Cloud Storage
.IP \[bu] 2
FileLu S5 (S3-Compatible Object Storage)
.IP \[bu] 2
Filen
.IP \[bu] 2
Files.com
.IP \[bu] 2
FlashBlade
.IP \[bu] 2
FTP
.IP \[bu] 2
Gofile
.IP \[bu] 2
Google Cloud Storage
.IP \[bu] 2
Google Drive
.IP \[bu] 2
Google Photos
.IP \[bu] 2
HDFS
.IP \[bu] 2
Hetzner Object Storage
.IP \[bu] 2
Hetzner Storage Box
.IP \[bu] 2
HiDrive
.IP \[bu] 2
Hitachi Content Platform (HCP)
.IP \[bu] 2
HTTP
.IP \[bu] 2
Huawei Drive
.IP \[bu] 2
Huawei OBS
.IP \[bu] 2
iCloud Drive
.IP \[bu] 2
ImageKit
.IP \[bu] 2
Internet Archive
.IP \[bu] 2
Internxt
.IP \[bu] 2
Jottacloud
.IP \[bu] 2
IBM COS S3
.IP \[bu] 2
IDrive e2
.IP \[bu] 2
Impossible Cloud
.IP \[bu] 2
Infomaniak Swiss Backup (S3)
.IP \[bu] 2
Infomaniak Swiss Backup (Swift)
.IP \[bu] 2
Intercolo Object Storage
.IP \[bu] 2
IONOS Cloud
.IP \[bu] 2
kDrive
.IP \[bu] 2
Koofr
.IP \[bu] 2
Leviia Object Storage
.IP \[bu] 2
Liara Object Storage
.IP \[bu] 2
Linkbox
.IP \[bu] 2
Linode Object Storage
.IP \[bu] 2
Magalu
.IP \[bu] 2
Mail.ru Cloud
.IP \[bu] 2
Memset Memstore
.IP \[bu] 2
MEGA
.IP \[bu] 2
MEGA S4
.IP \[bu] 2
Memory
.IP \[bu] 2
Microsoft Azure Blob Storage
.IP \[bu] 2
Microsoft Azure Files Storage
.IP \[bu] 2
Microsoft OneDrive
.IP \[bu] 2
Minio
.IP \[bu] 2
Neon Object Storage
.IP \[bu] 2
Nextcloud
.IP \[bu] 2
Blomp Cloud Storage
.IP \[bu] 2
OpenDrive
.IP \[bu] 2
OpenStack Swift
.IP \[bu] 2
Oracle Cloud Storage Swift
.IP \[bu] 2
Oracle Object Storage
.IP \[bu] 2
Outscale
.IP \[bu] 2
OVHcloud Object Storage (Swift)
.IP \[bu] 2
OVHcloud Object Storage (S3-compatible)
.IP \[bu] 2
ownCloud
.IP \[bu] 2
pCloud
.IP \[bu] 2
Petabox
.IP \[bu] 2
PikPak
.IP \[bu] 2
Pixeldrain
.IP \[bu] 2
premiumize.me
.IP \[bu] 2
put.io
.IP \[bu] 2
Proton Drive
.IP \[bu] 2
QingStor
.IP \[bu] 2
Qiniu Cloud Object Storage (Kodo)
.IP \[bu] 2
Quatrix by Maytech
.IP \[bu] 2
Rabata Cloud Storage
.IP \[bu] 2
RackCorp Object Storage
.IP \[bu] 2
Rackspace Cloud Files
.IP \[bu] 2
Rclone Serve S3
.IP \[bu] 2
RelAix.Storage
.IP \[bu] 2
rsync.net
.IP \[bu] 2
Scaleway
.IP \[bu] 2
Scality (RING / ARTESCA)
.IP \[bu] 2
Seafile
.IP \[bu] 2
Seagate Lyve Cloud
.IP \[bu] 2
SeaweedFS
.IP \[bu] 2
Selectel
.IP \[bu] 2
Servercore Object Storage
.IP \[bu] 2
SFTP
.IP \[bu] 2
Shade
.IP \[bu] 2
Sia
.IP \[bu] 2
SMB / CIFS
.IP \[bu] 2
Spectra Logic
.IP \[bu] 2
Storj
.IP \[bu] 2
Synology
.IP \[bu] 2
SugarSync
.IP \[bu] 2
Tencent Cloud Object Storage (COS)
.IP \[bu] 2
Uloz.to
.IP \[bu] 2
US3
.IP \[bu] 2
Wasabi
.IP \[bu] 2
WebDAV
.IP \[bu] 2
Yandex Disk
.IP \[bu] 2
Zadara Object Storage
.IP \[bu] 2
Zero Services (ZERO-Z3)
.IP \[bu] 2
Zoho WorkDrive
.IP \[bu] 2
Zata
.IP \[bu] 2
The local filesystem
.SS Virtual providers
.PP
These backends adapt or modify other storage providers:
.IP \[bu] 2
Alias: Rename existing remotes
.IP \[bu] 2
Archive: Read archive files
.IP \[bu] 2
Cache: Cache remotes (DEPRECATED)
.IP \[bu] 2
Chunker: Split large files
.IP \[bu] 2
Combine: Combine multiple remotes into a directory tree
.IP \[bu] 2
Compress: Compress files
.IP \[bu] 2
Crypt: Encrypt files
.IP \[bu] 2
Hasher: Hash files
.IP \[bu] 2
Union: Join multiple remotes to work together
.SS Links
.IP \[bu] 2
Home page (https://rclone.org/)
.IP \[bu] 2
GitHub project page for source and bug
tracker (https://github.com/rclone/rclone)
.IP \[bu] 2
Rclone Forum (https://forum.rclone.org)
.IP \[bu] 2
Downloads (https://rclone.org/downloads/)
.SH Install
.PP
Rclone is a Go program and comes as a single binary file.
.SS Quickstart
.IP \[bu] 2
Download (https://rclone.org/downloads/) the relevant binary.
.IP \[bu] 2
Extract the \f[V]rclone\f[R] executable, \f[V]rclone.exe\f[R] on
Windows, from the archive.
.IP \[bu] 2
Run \f[V]rclone config\f[R] to setup.
See rclone config docs (https://rclone.org/docs/) for more details.
.IP \[bu] 2
Optionally configure automatic execution.
.PP
See below for some expanded Linux / macOS / Windows instructions.
.PP
See the usage (https://rclone.org/docs/) docs for how to use rclone, or
run \f[V]rclone -h\f[R].
.PP
Already installed rclone can be easily updated to the latest version
using the rclone
selfupdate (https://rclone.org/commands/rclone_selfupdate/) command.
.PP
See the release signing docs (https://rclone.org/release_signing/) for
how to verify signatures on the release.
.SS Script installation
.PP
To install rclone on Linux/macOS/BSD systems, run:
.IP
.nf
\f[C]
sudo -v ; curl https://rclone.org/install.sh | sudo bash
\f[R]
.fi
.PP
For beta installation, run:
.IP
.nf
\f[C]
sudo -v ; curl https://rclone.org/install.sh | sudo bash -s beta
\f[R]
.fi
.PP
Note that this script checks the version of rclone installed first and
won\[aq]t re-download if not needed.
.SS Linux installation
.SS Precompiled binary
.PP
Fetch and unpack
.IP
.nf
\f[C]
curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
unzip rclone-current-linux-amd64.zip
cd rclone-*-linux-amd64
\f[R]
.fi
.PP
Copy binary file
.IP
.nf
\f[C]
sudo cp rclone /usr/bin/
sudo chown root:root /usr/bin/rclone
sudo chmod 755 /usr/bin/rclone
\f[R]
.fi
.PP
Install manpage
.IP
.nf
\f[C]
sudo mkdir -p /usr/local/share/man/man1
sudo cp rclone.1 /usr/local/share/man/man1/
sudo mandb
\f[R]
.fi
.PP
Run \f[V]rclone config\f[R] to setup.
See rclone config docs (https://rclone.org/docs/) for more details.
.IP
.nf
\f[C]
rclone config
\f[R]
.fi
.SS macOS installation
.SS Installation with brew
.IP
.nf
\f[C]
brew install rclone
\f[R]
.fi
.PP
NOTE: This version of rclone will not support \f[V]mount\f[R] any more
(see #5373 (https://github.com/rclone/rclone/issues/5373)).
If mounting is wanted on macOS, either install a precompiled binary or
enable the relevant option when installing from source.
.PP
Note that this is a third party installer not controlled by the rclone
developers so it may be out of date.
Its current version is as below.
.PP
[IMAGE: Homebrew
package (https://repology.org/badge/version-for-repo/homebrew/rclone.svg)] (https://repology.org/project/rclone/versions)
.SS Installation with MacPorts
.PP
On macOS, rclone can also be installed via
MacPorts (https://www.macports.org):
.IP
.nf
\f[C]
sudo port install rclone
\f[R]
.fi
.PP
Note that this is a third party installer not controlled by the rclone
developers so it may be out of date.
Its current version is as below.
.PP
[IMAGE: MacPorts
port (https://repology.org/badge/version-for-repo/macports/rclone.svg)] (https://repology.org/project/rclone/versions)
.PP
More information on
macports.org (https://ports.macports.org/port/rclone/).
.SS Precompiled binary, using curl
.PP
To avoid problems with macOS gatekeeper enforcing the binary to be
signed and notarized it is enough to download with \f[V]curl\f[R].
.PP
Download the latest version of rclone.
.IP
.nf
\f[C]
cd && curl -O https://downloads.rclone.org/rclone-current-osx-amd64.zip
\f[R]
.fi
.PP
Unzip the download and cd to the extracted folder.
.IP
.nf
\f[C]
unzip -a rclone-current-osx-amd64.zip && cd rclone-*-osx-amd64
\f[R]
.fi
.PP
Move rclone to your $PATH.
You will be prompted for your password.
.IP
.nf
\f[C]
sudo mkdir -p /usr/local/bin
sudo mv rclone /usr/local/bin/
\f[R]
.fi
.PP
(the \f[V]mkdir\f[R] command is safe to run, even if the directory
already exists).
.PP
Remove the leftover files.
.IP
.nf
\f[C]
cd .. && rm -rf rclone-*-osx-amd64 rclone-current-osx-amd64.zip
\f[R]
.fi
.PP
Run \f[V]rclone config\f[R] to setup.
See rclone config docs (https://rclone.org/docs/) for more details.
.IP
.nf
\f[C]
rclone config
\f[R]
.fi
.SS Precompiled binary, using a web browser
.PP
When downloading a binary with a web browser, the browser will set the
macOS gatekeeper quarantine attribute.
Starting from Catalina, when attempting to run \f[V]rclone\f[R], a
pop-up will appear saying:
.IP
.nf
\f[C]
\[dq]rclone\[dq] cannot be opened because the developer cannot be verified.
macOS cannot verify that this app is free from malware.
\f[R]
.fi
.PP
The simplest fix is to run
.IP
.nf
\f[C]
xattr -d com.apple.quarantine rclone
\f[R]
.fi
.SS Windows installation
.SS Precompiled binary
.PP
Fetch the correct binary for your processor type by clicking on these
links.
If not sure, use the first link.
.IP \[bu] 2
Intel/AMD - 64
Bit (https://downloads.rclone.org/rclone-current-windows-amd64.zip)
.IP \[bu] 2
Intel/AMD - 32
Bit (https://downloads.rclone.org/rclone-current-windows-386.zip)
.IP \[bu] 2
ARM - 64
Bit (https://downloads.rclone.org/rclone-current-windows-arm64.zip)
.PP
Open this file in the Explorer and extract \f[V]rclone.exe\f[R].
Rclone is a portable executable so you can place it wherever is
convenient.
.PP
Open a CMD window (or powershell) and run the binary.
Note that rclone does not launch a GUI by default, it runs in the CMD
Window.
.IP \[bu] 2
Run \f[V]rclone.exe config\f[R] to setup.
See rclone config docs (https://rclone.org/docs/) for more details.
.IP \[bu] 2
Optionally configure automatic execution.
.PP
If you are planning to use the rclone
mount (https://rclone.org/commands/rclone_mount/) feature then you will
need to install the third party utility WinFsp (https://winfsp.dev/)
also.
.SS Windows package manager (Winget)
.PP
Winget (https://learn.microsoft.com/en-us/windows/package-manager/)
comes pre-installed with the latest versions of Windows.
If not, update the App
Installer (https://www.microsoft.com/p/app-installer/9nblggh4nns1)
package from the Microsoft store.
.PP
To install rclone
.IP
.nf
\f[C]
winget install Rclone.Rclone
\f[R]
.fi
.PP
To uninstall rclone
.IP
.nf
\f[C]
winget uninstall Rclone.Rclone --force
\f[R]
.fi
.SS Chocolatey package manager
.PP
Make sure you have Choco (https://chocolatey.org/) installed
.IP
.nf
\f[C]
choco search rclone
choco install rclone
\f[R]
.fi
.PP
This will install rclone on your Windows machine.
If you are planning to use rclone
mount (https://rclone.org/commands/rclone_mount/) then
.IP
.nf
\f[C]
choco install winfsp
\f[R]
.fi
.PP
will install that too.
.PP
Note that this is a third party installer not controlled by the rclone
developers so it may be out of date.
Its current version is as below.
.PP
[IMAGE: Chocolatey
package (https://repology.org/badge/version-for-repo/chocolatey/rclone.svg)] (https://repology.org/project/rclone/versions)
.SS Scoop package manager
.PP
Make sure you have Scoop (https://scoop.sh/) installed
.IP
.nf
\f[C]
scoop install rclone
\f[R]
.fi
.PP
Note that this is a third party installer not controlled by the rclone
developers so it may be out of date.
Its current version is as below.
.PP
[IMAGE: Scoop
package (https://repology.org/badge/version-for-repo/scoop/rclone.svg)] (https://repology.org/project/rclone/versions)
.SS Package manager installation
.PP
Many Linux, Windows, macOS and other OS distributions package and
distribute rclone.
.PP
The distributed versions of rclone are often quite out of date and for
this reason we recommend one of the other installation methods if
possible.
.PP
You can get an idea of how up to date or not your OS distribution\[aq]s
package is here.
.PP
[IMAGE: Packaging
status (https://repology.org/badge/vertical-allrepos/rclone.svg?columns=3)] (https://repology.org/project/rclone/versions)
.SS Docker installation
.PP
The rclone developers maintain a docker image for
rclone (https://hub.docker.com/r/rclone/rclone).
.PP
These images are built as part of the release process based on a minimal
Alpine Linux.
.PP
The \f[V]:latest\f[R] tag will always point to the latest stable
release.
You can use the \f[V]:beta\f[R] tag to get the latest build from master.
You can also use version tags, e.g.
\f[V]:1.49.1\f[R], \f[V]:1.49\f[R] or \f[V]:1\f[R].
.IP
.nf
\f[C]
$ docker pull rclone/rclone:latest
latest: Pulling from rclone/rclone
Digest: sha256:0e0ced72671989bb837fea8e88578b3fc48371aa45d209663683e24cfdaa0e11
\&...
$ docker run --rm rclone/rclone:latest version
rclone v1.49.1
- os/arch: linux/amd64
- go version: go1.12.9
\f[R]
.fi
.PP
There are a few command line options to consider when starting an rclone
Docker container from the rclone image.
.IP \[bu] 2
You need to mount the host rclone config dir at \f[V]/config/rclone\f[R]
into the Docker container.
Due to the fact that rclone updates tokens inside its config file, and
that the update process involves a file rename, you need to mount the
whole host rclone config dir, not just the single host rclone config
file.
.IP \[bu] 2
You need to mount a host data dir at \f[V]/data\f[R] into the Docker
container.
.IP \[bu] 2
By default, the rclone binary inside a Docker container runs with UID=0
(root).
As a result, all files created in a run will have UID=0.
If your config and data files reside on the host with a non-root
UID:GID, you need to pass these on the container start command line.
.IP \[bu] 2
If you want to access the RC interface (either via the API or the Web
UI), it is required to set the \f[V]--rc-addr\f[R] to \f[V]:5572\f[R] in
order to connect to it from outside the container.
An explanation about why this is necessary can be found in an old
pythonspeed.com (https://web.archive.org/web/20200808071950/https://pythonspeed.com/articles/docker-connection-refused/)
article.
.RS 2
.IP \[bu] 2
NOTE: Users running this container with the docker network set to
\f[V]host\f[R] should probably set it to listen to localhost only, with
\f[V]127.0.0.1:5572\f[R] as the value for \f[V]--rc-addr\f[R]
.RE
.IP \[bu] 2
It is possible to use \f[V]rclone mount\f[R] inside a userspace Docker
container, and expose the resulting fuse mount to the host.
The exact \f[V]docker run\f[R] options to do that might vary slightly
between hosts.
See, e.g.
the discussion in this
thread (https://github.com/moby/moby/issues/9448).
.RS 2
.PP
You also need to mount the host \f[V]/etc/passwd\f[R] and
\f[V]/etc/group\f[R] for fuse to work inside the container.
.RE
.PP
Here are some commands tested on an Ubuntu 18.04.3 host:
.IP
.nf
\f[C]
# config on host at \[ti]/.config/rclone/rclone.conf
# data on host at \[ti]/data
# add a remote interactively
docker run --rm -it \[rs]
--volume \[ti]/.config/rclone:/config/rclone \[rs]
--user $(id -u):$(id -g) \[rs]
rclone/rclone \[rs]
config
# make sure the config is ok by listing the remotes
docker run --rm \[rs]
--volume \[ti]/.config/rclone:/config/rclone \[rs]
--user $(id -u):$(id -g) \[rs]
rclone/rclone \[rs]
listremotes
# perform mount inside Docker container, expose result to host
mkdir -p \[ti]/data/mount
docker run --rm \[rs]
--volume \[ti]/.config/rclone:/config/rclone \[rs]
--volume \[ti]/data:/data:shared \[rs]
--user $(id -u):$(id -g) \[rs]
--volume /etc/passwd:/etc/passwd:ro --volume /etc/group:/etc/group:ro \[rs]
--device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined \[rs]
rclone/rclone \[rs]
mount dropbox:Photos /data/mount &
ls \[ti]/data/mount
kill %1
\f[R]
.fi
.SS Snap installation
.PP
[IMAGE: Get it from the Snap
Store (https://snapcraft.io/static/images/badges/en/snap-store-black.svg)] (https://snapcraft.io/rclone)
.PP
Make sure you have Snapd
installed (https://snapcraft.io/docs/installing-snapd)
.IP
.nf
\f[C]
sudo snap install rclone
\f[R]
.fi
.PP
Due to the strict confinement of Snap, rclone snap cannot access real
\f[V]/home/$USER/.config/rclone\f[R] directory, default config path is
as below.
.IP \[bu] 2
Default config directory:
.RS 2
.IP \[bu] 2
/home/$USER/snap/rclone/current/.config/rclone
.RE
.PP
Note: Due to the strict confinement of Snap, \f[V]rclone mount\f[R]
feature is \f[V]not\f[R] supported.
.PP
If mounting is wanted, either install a precompiled binary or enable the
relevant option when installing from source.
.PP
Note that this is controlled by community
maintainer (https://github.com/boukendesho/rclone-snap) not the rclone
developers so it may be out of date.
Its current version is as below.
.PP
[IMAGE: rclone (https://snapcraft.io/rclone/badge.svg)] (https://snapcraft.io/rclone)
.SS Source installation
.PP
Make sure you have git and Go (https://golang.org/) installed.
Go version 1.26 or newer is required, the latest release is recommended.
You can get it from your package manager, or download it from
golang.org/dl (https://golang.org/dl/).
Then you can run the following:
.IP
.nf
\f[C]
git clone https://github.com/rclone/rclone.git
cd rclone
go build
\f[R]
.fi
.PP
This will check out the rclone source in subfolder rclone, which you can
later modify and send pull requests with.
Then it will build the rclone executable in the same folder.
As an initial check you can now run \f[V]./rclone version\f[R]
(\f[V].\[rs]rclone version\f[R] on Windows).
.PP
Note that on macOS and Windows the
mount (https://rclone.org/commands/rclone_mount/) command will not be
available unless you specify an additional build tag \f[V]cmount\f[R].
.IP
.nf
\f[C]
go build -tags cmount
\f[R]
.fi
.PP
This assumes you have a GCC compatible C compiler (GCC or Clang) in your
PATH, as it uses cgo (https://pkg.go.dev/cmd/cgo).
But on Windows, the cgofuse (https://github.com/winfsp/cgofuse) library
that the cmount implementation is based on, also supports building
without cgo (https://github.com/golang/go/wiki/WindowsDLLs), i.e.
by setting environment variable CGO_ENABLED to value 0 (static linking).
This is how the official Windows release of rclone is being built,
starting with version 1.59.
It is still possible to build with cgo on Windows as well, by using the
MinGW port of GCC, e.g.
by installing it in a MSYS2 (https://www.msys2.org) distribution (make
sure you install it in the classic mingw64 subsystem, the ucrt64 version
is not compatible).
.PP
Additionally, to build with mount on Windows, you must install the third
party utility WinFsp (https://winfsp.dev/), with the \[dq]Developer\[dq]
feature selected.
If building with cgo, you must also set environment variable CPATH
pointing to the fuse include directory within the WinFsp installation
(normally
\f[V]C:\[rs]Program Files (x86)\[rs]WinFsp\[rs]inc\[rs]fuse\f[R]).
.PP
You may add arguments \f[V]-ldflags -s\f[R] to omit symbol table and
debug information, making the executable file smaller, and
\f[V]-trimpath\f[R] to remove references to local file system paths.
The official rclone releases are built with both of these.
.IP
.nf
\f[C]
go build -trimpath -ldflags -s -tags cmount
\f[R]
.fi
.PP
If you want to customize the version string, as reported by the
\f[V]rclone version\f[R] command, you can set one of the variables
\f[V]fs.Version\f[R], \f[V]fs.VersionTag\f[R] (to keep default suffix
but customize the number), or \f[V]fs.VersionSuffix\f[R] (to keep
default number but customize the suffix).
This can be done from the build command, by adding to the
\f[V]-ldflags\f[R] argument value as shown below.
.IP
.nf
\f[C]
go build -trimpath -ldflags \[dq]-s -X github.com/rclone/rclone/fs.Version=v9.9.9-test\[dq] -tags cmount
\f[R]
.fi
.PP
On Windows, the official executables also have the version information,
as well as a file icon, embedded as binary resources.
To get that with your own build you need to run the following command
\f[B]before\f[R] the build command.
It generates a Windows resource system object file, with extension
\&.syso, e.g.
\f[V]resource_windows_amd64.syso\f[R], that will be automatically picked
up by future build commands.
.IP
.nf
\f[C]
go run bin/resource_windows.go
\f[R]
.fi
.PP
The above command will generate a resource file containing version
information based on the fs.Version variable in source at the time you
run the command, which means if the value of this variable changes you
need to re-run the command for it to be reflected in the version
information.
Also, if you override this version variable in the build command as
described above, you need to do that also when generating the resource
file, or else it will still use the value from the source.
.IP
.nf
\f[C]
go run bin/resource_windows.go -version v9.9.9-test
\f[R]
.fi
.PP
Instead of executing the \f[V]go build\f[R] command directly, you can
run it via the Makefile.
The default target changes the version suffix from \[dq]-DEV\[dq] to
\[dq]-beta\[dq] followed by additional commit details, embeds version
information binary resources on Windows, and copies the resulting rclone
executable into your GOPATH bin folder (\f[V]$(go env GOPATH)/bin\f[R],
which corresponds to \f[V]\[ti]/go/bin/rclone\f[R] by default).
.IP
.nf
\f[C]
make
\f[R]
.fi
.PP
To include mount command on macOS and Windows with Makefile build:
.IP
.nf
\f[C]
make GOTAGS=cmount
\f[R]
.fi
.PP
There are other make targets that can be used for more advanced builds,
such as cross-compiling for all supported os/architectures, and
packaging results into release artifacts.
See Makefile (https://github.com/rclone/rclone/blob/master/Makefile) and
cross-compile.go (https://github.com/rclone/rclone/blob/master/bin/cross-compile.go)
for details.
.PP
Another alternative method for source installation is to download the
source, build and install rclone - all in one operation, as a regular Go
package.
The source will be stored it in the Go module cache, and the resulting
executable will be in your GOPATH bin folder
(\f[V]$(go env GOPATH)/bin\f[R], which corresponds to
\f[V]\[ti]/go/bin/rclone\f[R] by default).
.IP
.nf
\f[C]
go install github.com/rclone/rclone\[at]latest
\f[R]
.fi
.PP
In some situations, rclone executable size might be too big for
deployment in very restricted environments when all backends with large
SDKs are included.
To limit binary size unused backends can be commented out in
\f[V]backends/all/all.go\f[R] and unused commands in
\f[V]cmd/all/all.go\f[R] before building with \f[V]go build\f[R] or
\f[V]make\f[R]
.SS Ansible installation
.PP
This can be done with Stefan Weichinger\[aq]s ansible
role (https://github.com/stefangweichinger/ansible-rclone).
.PP
Instructions
.IP "1." 3
\f[V]git clone https://github.com/stefangweichinger/ansible-rclone.git\f[R]
into your local roles-directory
.IP "2." 3
add the role to the hosts you want rclone installed to:
.RS 4
.IP
.nf
\f[C]
- hosts: rclone-hosts
roles:
- rclone
\f[R]
.fi
.RE
.SS Portable installation
.PP
As mentioned above (https://rclone.org/install/#quickstart), rclone is
single executable (\f[V]rclone\f[R], or \f[V]rclone.exe\f[R] on Windows)
that you can download as a zip archive and extract into a location of
your choosing.
When executing different commands, it may create files in different
locations, such as a configuration file and various temporary files.
By default the locations for these are according to your operating
system, e.g.
configuration file in your user profile directory and temporary files in
the standard temporary directory, but you can customize all of them,
e.g.
to make a completely self-contained, portable installation.
.PP
Run the config paths (https://rclone.org/commands/rclone_config_paths/)
command to see the locations that rclone will use.
.PP
To override them set the corresponding options (as command-line
arguments, or as environment
variables (https://rclone.org/docs/#environment-variables)):
.IP \[bu] 2
--config (https://rclone.org/docs/#config-string)
.IP \[bu] 2
--cache-dir (https://rclone.org/docs/#cache-dir-string)
.IP \[bu] 2
--temp-dir (https://rclone.org/docs/#temp-dir-string)
.SS Autostart
.PP
After installing and configuring rclone, as described above, you are
ready to use rclone as an interactive command line utility.
If your goal is to perform \f[I]periodic\f[R] operations, such as a
regular sync (https://rclone.org/commands/rclone_sync/), you will
probably want to configure your rclone command in your operating
system\[aq]s scheduler.
If you need to expose \f[I]service\f[R]-like features, such as remote
control (https://rclone.org/rc/), GUI (https://rclone.org/gui/),
serve (https://rclone.org/commands/rclone_serve/) or
mount (https://rclone.org/commands/rclone_mount/), you will often want
an rclone command always running in the background, and configuring it
to run in a service infrastructure may be a better option.
Below are some alternatives on how to achieve this on different
operating systems.
.PP
NOTE: Before setting up autorun it is highly recommended that you have
tested your command manually from a Command Prompt first.
.SS Autostart on Windows
.PP
The most relevant alternatives for autostart on Windows are:
.IP \[bu] 2
Run at user log on using the Startup folder
.IP \[bu] 2
Run at user log on, at system startup or at schedule using Task
Scheduler
.IP \[bu] 2
Run at system startup using Windows service
.SS Running in background
.PP
Rclone is a console application, so if not starting from an existing
Command Prompt, e.g.
when starting rclone.exe from a shortcut, it will open a Command Prompt
window.
When configuring rclone to run from task scheduler and windows service
you are able to set it to run hidden in background.
From rclone version 1.54 you can also make it run hidden from anywhere
by adding option \f[V]--no-console\f[R] (it may still flash briefly when
the program starts).
Since rclone normally writes information and any error messages to the
console, you must redirect this to a file to be able to see it.
Rclone has a built-in option \f[V]--log-file\f[R] for that.
.PP
Example command to run a sync in background:
.IP
.nf
\f[C]
c:\[rs]rclone\[rs]rclone.exe sync c:\[rs]files remote:/files --no-console --log-file c:\[rs]rclone\[rs]logs\[rs]sync_files.txt
\f[R]
.fi
.SS User account
.PP
As mentioned in the mount (https://rclone.org/commands/rclone_mount/)
documentation, mounted drives created as Administrator are not visible
to other accounts, not even the account that was elevated as
Administrator.
By running the mount command as the built-in \f[V]SYSTEM\f[R] user
account, it will create drives accessible for everyone on the system.
Both scheduled task and Windows service can be used to achieve this.
.PP
NOTE: Remember that when rclone runs as the \f[V]SYSTEM\f[R] user, the
user profile that it sees will not be yours.
This means that if you normally run rclone with configuration file in
the default location, to be able to use the same configuration when
running as the system user you must explicitly tell rclone where to find
it with the \f[V]--config\f[R] (https://rclone.org/docs/#config-string)
option, or else it will look in the system users profile path
(\f[V]C:\[rs]Windows\[rs]System32\[rs]config\[rs]systemprofile\f[R]).
To test your command manually from a Command Prompt, you can run it with
the
PsExec (https://docs.microsoft.com/en-us/sysinternals/downloads/psexec)
utility from Microsoft\[aq]s Sysinternals suite, which takes option
\f[V]-s\f[R] to execute commands as the \f[V]SYSTEM\f[R] user.
.SS Start from Startup folder
.PP
To quickly execute an rclone command you can simply create a standard
Windows Explorer shortcut for the complete rclone command you want to
run.
If you store this shortcut in the special \[dq]Startup\[dq] start-menu
folder, Windows will automatically run it at login.
To open this folder in Windows Explorer, enter path
\f[V]%APPDATA%\[rs]Microsoft\[rs]Windows\[rs]Start Menu\[rs]Programs\[rs]Startup\f[R],
or
\f[V]C:\[rs]ProgramData\[rs]Microsoft\[rs]Windows\[rs]Start Menu\[rs]Programs\[rs]StartUp\f[R]
if you want the command to start for \f[I]every\f[R] user that logs in.
.PP
This is the easiest approach to autostarting of rclone, but it offers no
functionality to set it to run as different user, or to set conditions
or actions on certain events.
Setting up a scheduled task as described below will often give you
better results.
.SS Start from Task Scheduler
.PP
Task Scheduler is an administrative tool built into Windows, and it can
be used to configure rclone to be started automatically in a highly
configurable way, e.g.
periodically on a schedule, on user log on, or at system startup.
It can run be configured to run as the current user, or for a mount
command that needs to be available to all users it can run as the
\f[V]SYSTEM\f[R] user.
For technical information, see Task Scheduler for
developers (https://docs.microsoft.com/windows/win32/taskschd/task-scheduler-start-page).
.SS Run as service
.PP
For running rclone at system startup, you can create a Windows service
that executes your rclone command, as an alternative to scheduled task
configured to run at startup.
.SS Mount command built-in service integration
.PP
For mount commands, rclone has a built-in Windows service integration
via the third-party WinFsp library it uses.
Registering as a regular Windows service easy, as you just have to
execute the built-in PowerShell command \f[V]New-Service\f[R] (requires
administrative privileges).
.PP
Example of a PowerShell command that creates a Windows service for
mounting some \f[V]remote:/files\f[R] as drive letter \f[V]X:\f[R], for
\f[I]all\f[R] users (service will be running as the local system
account):
.IP
.nf
\f[C]
New-Service -Name Rclone -BinaryPathName \[aq]c:\[rs]rclone\[rs]rclone.exe mount remote:/files X: --config c:\[rs]rclone\[rs]config\[rs]rclone.conf --log-file c:\[rs]rclone\[rs]logs\[rs]mount.txt\[aq]
\f[R]
.fi
.PP
The WinFsp service
infrastructure (https://github.com/billziss-gh/winfsp/wiki/WinFsp-Service-Architecture)
supports incorporating services for file system implementations, such as
rclone, into its own launcher service, as kind of \[dq]child
services\[dq].
This has the additional advantage that it also implements a network
provider that integrates into Windows standard methods for managing
network drives.
This is currently not officially supported by Rclone, but with WinFsp
version 2019.3 B2 / v1.5B2 or later it should be possible through path
rewriting as described in
#3340 (https://github.com/rclone/rclone/issues/3340).
.SS Third-party service integration
.PP
To Windows service running any rclone command, the excellent third-party
utility NSSM (http://nssm.cc), the \[dq]Non-Sucking Service
Manager\[dq], can be used.
It includes some advanced features such as adjusting process priority,
defining process environment variables, redirect to file anything
written to stdout, and customized response to different exit codes, with
a GUI to configure everything from (although it can also be used from
command line ).
.PP
There are also several other alternatives.
To mention one more, WinSW (https://github.com/winsw/winsw),
\[dq]Windows Service Wrapper\[dq], is worth checking out.
It requires .NET Framework, but it is preinstalled on newer versions of
Windows, and it also provides alternative standalone distributions which
includes necessary runtime (.NET 5).
WinSW is a command-line only utility, where you have to manually create
an XML file with service configuration.
This may be a drawback for some, but it can also be an advantage as it
is easy to back up and reuse the configuration settings, without having
go through manual steps in a GUI.
One thing to note is that by default it does not restart the service on
error, one have to explicit enable this in the configuration file (via
the \[dq]onfailure\[dq] parameter).
.SS Autostart on Linux
.SS Start as a service
.PP
To always run rclone in background, relevant for mount commands etc, you
can use systemd to set up rclone as a system or user service.
Running as a system service ensures that it is run at startup even if
the user it is running as has no active session.
Running rclone as a user service ensures that it only starts after the
configured user has logged into the system.
.SS Run periodically from cron
.PP
To run a periodic command, such as a copy/sync, you can set up a cron
job.
.SH Usage
.PP
Rclone is a command line program to manage files on cloud storage.
After download (https://rclone.org/downloads/) and install, continue
here to learn how to use it: Initial configuration, what the basic
syntax looks like, describes the various subcommands, the various
options, and more.
.SS Configure
.PP
First, you\[aq]ll need to configure rclone.
As the object storage systems have quite complicated authentication
these are kept in a config file.
(See the \f[V]--config\f[R] entry for how to find the config file and
choose its location.)
.PP
The easiest way to make the config is to run rclone with the config
option:
.IP
.nf
\f[C]
rclone config
\f[R]
.fi
.PP
See the following for detailed instructions for
.IP \[bu] 2
1Fichier (https://rclone.org/fichier/)
.IP \[bu] 2
Akamai Netstorage (https://rclone.org/netstorage/)
.IP \[bu] 2
Alias (https://rclone.org/alias/)
.IP \[bu] 2
Archive (https://rclone.org/archive/)
.IP \[bu] 2
Amazon S3 (https://rclone.org/s3/)
.IP \[bu] 2
Backblaze B2 (https://rclone.org/b2/)
.IP \[bu] 2
Box (https://rclone.org/box/)
.IP \[bu] 2
Chunker (https://rclone.org/chunker/) - transparently splits large files
for other remotes
.IP \[bu] 2
Citrix ShareFile (https://rclone.org/sharefile/)
.IP \[bu] 2
Compress (https://rclone.org/compress/)
.IP \[bu] 2
Cloudinary (https://rclone.org/cloudinary/)
.IP \[bu] 2
Combine (https://rclone.org/combine/)
.IP \[bu] 2
Crypt (https://rclone.org/crypt/) - to encrypt other remotes
.IP \[bu] 2
DigitalOcean Spaces (https://rclone.org/s3/#digitalocean-spaces)
.IP \[bu] 2
Digi Storage (https://rclone.org/koofr/#digi-storage)
.IP \[bu] 2
dosya.dev (https://rclone.org/dosya/)
.IP \[bu] 2
Drime (https://rclone.org/drime/)
.IP \[bu] 2
Dropbox (https://rclone.org/dropbox/)
.IP \[bu] 2
Enterprise File Fabric (https://rclone.org/filefabric/)
.IP \[bu] 2
FileLu Cloud Storage (https://rclone.org/filelu/)
.IP \[bu] 2
Filen (https://rclone.org/filen/)
.IP \[bu] 2
Files.com (https://rclone.org/filescom/)
.IP \[bu] 2
FTP (https://rclone.org/ftp/)
.IP \[bu] 2
Gofile (https://rclone.org/gofile/)
.IP \[bu] 2
Google Cloud Storage (https://rclone.org/googlecloudstorage/)
.IP \[bu] 2
Google Drive (https://rclone.org/drive/)
.IP \[bu] 2
Google Photos (https://rclone.org/googlephotos/)
.IP \[bu] 2
Hasher (https://rclone.org/hasher/) - to handle checksums for other
remotes
.IP \[bu] 2
HDFS (https://rclone.org/hdfs/)
.IP \[bu] 2
Hetzner Storage Box (https://rclone.org/sftp/#hetzner-storage-box)
.IP \[bu] 2
HiDrive (https://rclone.org/hidrive/)
.IP \[bu] 2
HTTP (https://rclone.org/http/)
.IP \[bu] 2
Huawei Drive (https://rclone.org/huaweidrive/)
.IP \[bu] 2
iCloud Drive (https://rclone.org/iclouddrive/)
.IP \[bu] 2
Internet Archive (https://rclone.org/internetarchive/)
.IP \[bu] 2
Internxt (https://rclone.org/internxt/)
.IP \[bu] 2
Jottacloud (https://rclone.org/jottacloud/)
.IP \[bu] 2
kDrive (https://rclone.org/kdrive/)
.IP \[bu] 2
Koofr (https://rclone.org/koofr/)
.IP \[bu] 2
Linkbox (https://rclone.org/linkbox/)
.IP \[bu] 2
Mail.ru Cloud (https://rclone.org/mailru/)
.IP \[bu] 2
Mega (https://rclone.org/mega/)
.IP \[bu] 2
Memory (https://rclone.org/memory/)
.IP \[bu] 2
Microsoft Azure Blob Storage (https://rclone.org/azureblob/)
.IP \[bu] 2
Microsoft Azure Files Storage (https://rclone.org/azurefiles/)
.IP \[bu] 2
Microsoft OneDrive (https://rclone.org/onedrive/)
.IP \[bu] 2
OpenStack Swift / Rackspace Cloudfiles / Blomp Cloud Storage / Memset
Memstore (https://rclone.org/swift/)
.IP \[bu] 2
OpenDrive (https://rclone.org/opendrive/)
.IP \[bu] 2
Oracle Object Storage (https://rclone.org/oracleobjectstorage/)
.IP \[bu] 2
Pcloud (https://rclone.org/pcloud/)
.IP \[bu] 2
PikPak (https://rclone.org/pikpak/)
.IP \[bu] 2
Pixeldrain (https://rclone.org/pixeldrain/)
.IP \[bu] 2
premiumize.me (https://rclone.org/premiumizeme/)
.IP \[bu] 2
put.io (https://rclone.org/putio/)
.IP \[bu] 2
Proton Drive (https://rclone.org/protondrive/)
.IP \[bu] 2
QingStor (https://rclone.org/qingstor/)
.IP \[bu] 2
Quatrix by Maytech (https://rclone.org/quatrix/)
.IP \[bu] 2
rsync.net (https://rclone.org/sftp/#rsync-net)
.IP \[bu] 2
Seafile (https://rclone.org/seafile/)
.IP \[bu] 2
SFTP (https://rclone.org/sftp/)
.IP \[bu] 2
Shade (https://rclone.org/shade/)
.IP \[bu] 2
Sia (https://rclone.org/sia/)
.IP \[bu] 2
SMB (https://rclone.org/smb/)
.IP \[bu] 2
Storj (https://rclone.org/storj/)
.IP \[bu] 2
SugarSync (https://rclone.org/sugarsync/)
.IP \[bu] 2
Union (https://rclone.org/union/)
.IP \[bu] 2
Uloz.to (https://rclone.org/ulozto/)
.IP \[bu] 2
WebDAV (https://rclone.org/webdav/)
.IP \[bu] 2
Yandex Disk (https://rclone.org/yandex/)
.IP \[bu] 2
Zoho WorkDrive (https://rclone.org/zoho/)
.IP \[bu] 2
The local filesystem (https://rclone.org/local/)
.SS Basic syntax
.PP
Rclone syncs a directory tree from one storage system to another.
.PP
Its syntax is like this
.IP
.nf
\f[C]
rclone subcommand [options] <parameters> <parameters...>
\f[R]
.fi
.PP
A \f[V]subcommand\f[R] is an rclone operation required (e.g.
\f[V]sync\f[R], \f[V]copy\f[R], \f[V]ls\f[R]).
.PP
An \f[V]option\f[R] is a single letter flag (e.g.
\f[V]-v\f[R]) or a group of single letter flags (e.g.
\f[V]-Pv\f[R]) or a long flag (e.g.
\f[V]--progress\f[R]).
No options are required.
Options can come after the \f[V]subcommand\f[R] or in between parameters
too or on the end, but only global options can be used before the
\f[V]subcommand\f[R].
Anything after a \f[V]--\f[R] option will not be interpreted as an
option so if you need to add a parameter which starts with a \f[V]-\f[R]
then put a \f[V]--\f[R] on its own first, eg
.IP
.nf
\f[C]
rclone lsf -- -directory-starting-with-dash
\f[R]
.fi
.PP
A \f[V]parameter\f[R] is usually a file path or rclone remote, eg
\f[V]/path/to/file\f[R] or \f[V]remote:path/to/file\f[R] but it can be
other things - the \f[V]subcommand\f[R] help will tell you what.
.PP
Source and destination paths are specified by the name you gave the
storage system in the config file then the sub path, e.g.
\[dq]drive:myfolder\[dq] to look at \[dq]myfolder\[dq] in Google drive.
.PP
You can define as many storage paths as you like in the config file.
.PP
Please use the \f[V]--interactive\f[R]/\f[V]-i\f[R] flag while learning
rclone to avoid accidental data loss.
.SS Subcommands
.PP
rclone uses a system of subcommands.
For example
.IP
.nf
\f[C]
rclone ls remote:path # lists a remote
rclone copy /local/path remote:path # copies /local/path to the remote
rclone sync --interactive /local/path remote:path # syncs /local/path to the remote
\f[R]
.fi
.SH rclone config
.PP
Enter an interactive configuration session.
.SS Synopsis
.PP
Enter an interactive configuration session where you can setup new
remotes and manage existing ones.
You may also set or remove a password to protect your configuration.
.IP
.nf
\f[C]
rclone config [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for config
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.IP \[bu] 2
rclone config create (https://rclone.org/commands/rclone_config_create/)
- Create a new remote with name, type and options.
.IP \[bu] 2
rclone config delete (https://rclone.org/commands/rclone_config_delete/)
- Delete an existing remote.
.IP \[bu] 2
rclone config
disconnect (https://rclone.org/commands/rclone_config_disconnect/) -
Disconnects user from remote
.IP \[bu] 2
rclone config dump (https://rclone.org/commands/rclone_config_dump/) -
Dump the config file as JSON.
.IP \[bu] 2
rclone config edit (https://rclone.org/commands/rclone_config_edit/) -
Enter an interactive configuration session.
.IP \[bu] 2
rclone config
encryption (https://rclone.org/commands/rclone_config_encryption/) -
set, remove and check the encryption for the config file
.IP \[bu] 2
rclone config file (https://rclone.org/commands/rclone_config_file/) -
Show path of configuration file in use.
.IP \[bu] 2
rclone config
password (https://rclone.org/commands/rclone_config_password/) - Update
password in an existing remote.
.IP \[bu] 2
rclone config paths (https://rclone.org/commands/rclone_config_paths/) -
Show paths used for configuration, cache, temp etc.
.IP \[bu] 2
rclone config
providers (https://rclone.org/commands/rclone_config_providers/) - List
in JSON format all the providers and options.
.IP \[bu] 2
rclone config
reconnect (https://rclone.org/commands/rclone_config_reconnect/) -
Re-authenticates user with remote.
.IP \[bu] 2
rclone config
redacted (https://rclone.org/commands/rclone_config_redacted/) - Print
redacted (decrypted) config file, or the redacted config for a single
remote.
.IP \[bu] 2
rclone config show (https://rclone.org/commands/rclone_config_show/) -
Print (decrypted) config file, or the config for a single remote.
.IP \[bu] 2
rclone config string (https://rclone.org/commands/rclone_config_string/)
- Print connection string for a single remote.
.IP \[bu] 2
rclone config touch (https://rclone.org/commands/rclone_config_touch/) -
Ensure configuration file exists.
.IP \[bu] 2
rclone config unset (https://rclone.org/commands/rclone_config_unset/) -
Unset options in an existing remote.
.IP \[bu] 2
rclone config update (https://rclone.org/commands/rclone_config_update/)
- Update options in an existing remote.
.IP \[bu] 2
rclone config
userinfo (https://rclone.org/commands/rclone_config_userinfo/) - Prints
info about logged in user of remote.
.SH rclone copy
.PP
Copy files from source to dest, skipping identical files.
.SS Synopsis
.PP
Copy the source to the destination.
Does not transfer files that are identical on source and destination,
testing by size and modification time or MD5SUM.
Doesn\[aq]t delete files from the destination.
If you want to also delete files from destination, to make it match
source, use the sync (https://rclone.org/commands/rclone_sync/) command
instead.
.PP
Note that it is always the contents of the directory that is synced, not
the directory itself.
So when source:path is a directory, it\[aq]s the contents of source:path
that are copied, not the directory name and contents.
.PP
To copy single files, use the
copyto (https://rclone.org/commands/rclone_copyto/) command instead.
.PP
If dest:path doesn\[aq]t exist, it is created and the source:path
contents go there.
.PP
For example
.IP
.nf
\f[C]
rclone copy source:sourcepath dest:destpath
\f[R]
.fi
.PP
Let\[aq]s say there are two files in sourcepath
.IP
.nf
\f[C]
sourcepath/one.txt
sourcepath/two.txt
\f[R]
.fi
.PP
This copies them to
.IP
.nf
\f[C]
destpath/one.txt
destpath/two.txt
\f[R]
.fi
.PP
Not to
.IP
.nf
\f[C]
destpath/sourcepath/one.txt
destpath/sourcepath/two.txt
\f[R]
.fi
.PP
If you are familiar with \f[V]rsync\f[R], rclone always works as if you
had written a trailing \f[V]/\f[R] - meaning \[dq]copy the contents of
this directory\[dq].
This applies to all commands and whether you are talking about the
source or destination.
.PP
See the --no-traverse (https://rclone.org/docs/#no-traverse) option for
controlling whether rclone lists the destination directory or not.
Supplying this option when copying a small number of files into a large
destination can speed transfers up greatly.
.PP
For example, if you have many files in /path/to/src but only a few of
them change every day, you can copy all the files which have changed
recently very efficiently like this:
.IP
.nf
\f[C]
rclone copy --max-age 24h --no-traverse /path/to/src remote:
\f[R]
.fi
.PP
Rclone will sync the modification times of files and directories if the
backend supports it.
If metadata syncing is required then use the \f[V]--metadata\f[R] flag.
.PP
Note that the modification time and metadata for the root directory will
\f[B]not\f[R] be synced.
See issue #7652 (https://github.com/rclone/rclone/issues/7652) for more
info.
.PP
\f[B]Note\f[R]: Use the \f[V]-P\f[R]/\f[V]--progress\f[R] flag to view
real-time transfer statistics.
.PP
\f[B]Note\f[R]: Use the \f[V]--dry-run\f[R] or the
\f[V]--interactive\f[R]/\f[V]-i\f[R] flag to test without copying
anything.
.SS Logger Flags
.PP
The \f[V]--differ\f[R], \f[V]--missing-on-dst\f[R],
\f[V]--missing-on-src\f[R], \f[V]--match\f[R] and \f[V]--error\f[R]
flags write paths, one per line, to the file name (or stdout if it is
\f[V]-\f[R]) supplied.
What they write is described in the help below.
For example \f[V]--differ\f[R] will write all paths which are present on
both the source and destination but different.
.PP
The \f[V]--combined\f[R] flag will write a file (or stdout) which
contains all file paths with a symbol and then a space and then the path
to tell you what happened to it.
These are reminiscent of diff files.
.IP \[bu] 2
\f[V]= path\f[R] means path was found in source and destination and was
identical
.IP \[bu] 2
\f[V]- path\f[R] means path was missing on the source, so only in the
destination
.IP \[bu] 2
\f[V]+ path\f[R] means path was missing on the destination, so only in
the source
.IP \[bu] 2
\f[V]* path\f[R] means path was present in source and destination but
different.
.IP \[bu] 2
\f[V]! path\f[R] means there was an error reading or hashing the source
or dest.
.PP
The \f[V]--dest-after\f[R] flag writes a list file using the same format
flags as
\f[V]lsf\f[R] (https://rclone.org/commands/rclone_lsf/#synopsis)
(including customizable options for hash, modtime,
etc. (https://rclone.org/commands/rclone_lsf/#synopsis)) Conceptually it
is similar to rsync\[aq]s \f[V]--itemize-changes\f[R], but not identical
-- it should output an accurate list of what will be on the destination
after the command is finished.
.PP
When the \f[V]--no-traverse\f[R] flag is set, all logs involving files
that exist only on the destination will be incomplete or completely
missing.
.PP
Note that these logger flags have a few limitations, and certain
scenarios are not currently supported:
.IP \[bu] 2
\f[V]--max-duration\f[R] / \f[V]CutoffModeHard\f[R]
.IP \[bu] 2
\f[V]--compare-dest\f[R] / \f[V]--copy-dest\f[R]
.IP \[bu] 2
server-side moves of an entire dir at once
.IP \[bu] 2
High-level retries, because there would be duplicates (use
\f[V]--retries 1\f[R] to disable)
.IP \[bu] 2
Possibly some unusual error scenarios
.PP
Note also that each file is logged during execution, as opposed to
after, so it is most useful as a predictor of what SHOULD happen to each
file (which may or may not match what actually DID).
.IP
.nf
\f[C]
rclone copy source:path dest:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--absolute Put a leading / in front of path names
--combined string Make a combined report of changes to this file
--create-empty-src-dirs Create empty source dirs on destination after copy
--csv Output in CSV format
--dest-after string Report all files that exist on the dest post-sync
--differ string Report all non-matching files to this file
-d, --dir-slash Append a slash to directory names (default true)
--dirs-only Only list directories
--error string Report all files with errors (hashing or reading) to this file
--files-only Only list files (default true)
-F, --format string Output format - see lsf help for details (default \[dq]p\[dq])
--hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default \[dq]md5\[dq])
-h, --help help for copy
--match string Report all matching files to this file
--missing-on-dst string Report all files missing from the destination to this file
--missing-on-src string Report all files missing from the source to this file
-s, --separator string Separator for the items in the format (default \[dq];\[dq])
-t, --timeformat string Specify a custom time format - see docs for details (default: 2006-01-02 15:04:05)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Copy Options
.PP
Flags for anything which can copy a file
.IP
.nf
\f[C]
--check-first Do all the checks before starting transfers
-c, --checksum Check for changes with size & checksum (if available, or fallback to size only)
--compare-dest stringArray Include additional server-side paths during comparison
--copy-dest stringArray Implies --compare-dest but also copies files from paths into destination
--cutoff-mode HARD|SOFT|CAUTIOUS Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
--ignore-case-sync Ignore case when synchronizing
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
-I, --ignore-times Don\[aq]t skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
-l, --links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
--max-duration Duration Maximum duration rclone will transfer data for (default 0s)
--max-transfer SizeSuffix Maximum size of data to transfer (default off)
-M, --metadata If set, preserve metadata when copying objects
--modify-window Duration Max time diff to be considered the same (default 1ns)
--multi-thread-chunk-size SizeSuffix Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
--multi-thread-cutoff SizeSuffix Use multi-thread downloads for files above this size (default 256Mi)
--multi-thread-streams int Number of streams to use for multi-thread downloads (default 4)
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--name-transform stringArray Transform paths during the copy process
--no-check-dest Don\[aq]t check the destination, copy regardless
--no-traverse Don\[aq]t traverse destination file system on copy
--no-update-dir-modtime Don\[aq]t update directory modification times
--no-update-modtime Don\[aq]t update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. \[aq]size,descending\[aq]
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default \[dq].partial\[dq])
--refresh-times Refresh the modtime of remote files
--server-side-across-configs Allow server-side operations (e.g. copy) to work across different configs
--size-only Skip based on size only, not modtime or checksum
--streaming-upload-cutoff SizeSuffix Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
-u, --update Skip files that are newer on the destination
\f[R]
.fi
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone sync
.PP
Make source and dest identical, modifying destination only.
.SS Synopsis
.PP
Sync the source to the destination, changing the destination only.
Doesn\[aq]t transfer files that are identical on source and destination,
testing by size and modification time or MD5SUM.
Destination is updated to match source, including deleting files if
necessary (except duplicate objects, see below).
If you don\[aq]t want to delete files from destination, use the
copy (https://rclone.org/commands/rclone_copy/) command instead.
.PP
\f[B]Important\f[R]: Since this can cause data loss, test first with the
\f[V]--dry-run\f[R] or the \f[V]--interactive\f[R]/\f[V]i\f[R] flag.
.IP
.nf
\f[C]
rclone sync --interactive SOURCE remote:DESTINATION
\f[R]
.fi
.PP
Files in the destination won\[aq]t be deleted if there were any errors
at any point.
Duplicate objects (files with the same name, on those providers that
support it) are not yet handled.
Files that are excluded won\[aq]t be deleted unless
\f[V]--delete-excluded\f[R] is used.
Symlinks won\[aq]t be transferred or deleted from local file systems
unless \f[V]--links\f[R] is used.
.PP
It is always the contents of the directory that is synced, not the
directory itself.
So when source:path is a directory, it\[aq]s the contents of source:path
that are copied, not the directory name and contents.
See extended explanation in the
copy (https://rclone.org/commands/rclone_copy/) command if unsure.
.PP
If dest:path doesn\[aq]t exist, it is created and the source:path
contents go there.
.PP
It is not possible to sync overlapping remotes.
However, you may exclude the destination from the sync with a filter
rule or by putting an exclude-if-present file inside the destination
directory and sync to a destination that is inside the source directory.
.PP
Rclone will sync the modification times of files and directories if the
backend supports it.
If metadata syncing is required then use the \f[V]--metadata\f[R] flag.
.PP
Note that the modification time and metadata for the root directory will
\f[B]not\f[R] be synced.
See <https://github.com/rclone/rclone/issues/7652> for more info.
.PP
\f[B]Note\f[R]: Use the \f[V]-P\f[R]/\f[V]--progress\f[R] flag to view
real-time transfer statistics
.PP
\f[B]Note\f[R]: Use the \f[V]rclone dedupe\f[R] command to deal with
\[dq]Duplicate object/directory found in source/destination -
ignoring\[dq] errors.
See this forum
post (https://forum.rclone.org/t/sync-not-clearing-duplicates/14372) for
more info.
.SS Logger Flags
.PP
The \f[V]--differ\f[R], \f[V]--missing-on-dst\f[R],
\f[V]--missing-on-src\f[R], \f[V]--match\f[R] and \f[V]--error\f[R]
flags write paths, one per line, to the file name (or stdout if it is
\f[V]-\f[R]) supplied.
What they write is described in the help below.
For example \f[V]--differ\f[R] will write all paths which are present on
both the source and destination but different.
.PP
The \f[V]--combined\f[R] flag will write a file (or stdout) which
contains all file paths with a symbol and then a space and then the path
to tell you what happened to it.
These are reminiscent of diff files.
.IP \[bu] 2
\f[V]= path\f[R] means path was found in source and destination and was
identical
.IP \[bu] 2
\f[V]- path\f[R] means path was missing on the source, so only in the
destination
.IP \[bu] 2
\f[V]+ path\f[R] means path was missing on the destination, so only in
the source
.IP \[bu] 2
\f[V]* path\f[R] means path was present in source and destination but
different.
.IP \[bu] 2
\f[V]! path\f[R] means there was an error reading or hashing the source
or dest.
.PP
The \f[V]--dest-after\f[R] flag writes a list file using the same format
flags as
\f[V]lsf\f[R] (https://rclone.org/commands/rclone_lsf/#synopsis)
(including customizable options for hash, modtime,
etc. (https://rclone.org/commands/rclone_lsf/#synopsis)) Conceptually it
is similar to rsync\[aq]s \f[V]--itemize-changes\f[R], but not identical
-- it should output an accurate list of what will be on the destination
after the command is finished.
.PP
When the \f[V]--no-traverse\f[R] flag is set, all logs involving files
that exist only on the destination will be incomplete or completely
missing.
.PP
Note that these logger flags have a few limitations, and certain
scenarios are not currently supported:
.IP \[bu] 2
\f[V]--max-duration\f[R] / \f[V]CutoffModeHard\f[R]
.IP \[bu] 2
\f[V]--compare-dest\f[R] / \f[V]--copy-dest\f[R]
.IP \[bu] 2
server-side moves of an entire dir at once
.IP \[bu] 2
High-level retries, because there would be duplicates (use
\f[V]--retries 1\f[R] to disable)
.IP \[bu] 2
Possibly some unusual error scenarios
.PP
Note also that each file is logged during execution, as opposed to
after, so it is most useful as a predictor of what SHOULD happen to each
file (which may or may not match what actually DID).
.IP
.nf
\f[C]
rclone sync source:path dest:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--absolute Put a leading / in front of path names
--combined string Make a combined report of changes to this file
--create-empty-src-dirs Create empty source dirs on destination after sync
--csv Output in CSV format
--dest-after string Report all files that exist on the dest post-sync
--differ string Report all non-matching files to this file
-d, --dir-slash Append a slash to directory names (default true)
--dirs-only Only list directories
--error string Report all files with errors (hashing or reading) to this file
--files-only Only list files (default true)
-F, --format string Output format - see lsf help for details (default \[dq]p\[dq])
--hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default \[dq]md5\[dq])
-h, --help help for sync
--match string Report all matching files to this file
--missing-on-dst string Report all files missing from the destination to this file
--missing-on-src string Report all files missing from the source to this file
-s, --separator string Separator for the items in the format (default \[dq];\[dq])
-t, --timeformat string Specify a custom time format - see docs for details (default: 2006-01-02 15:04:05)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Copy Options
.PP
Flags for anything which can copy a file
.IP
.nf
\f[C]
--check-first Do all the checks before starting transfers
-c, --checksum Check for changes with size & checksum (if available, or fallback to size only)
--compare-dest stringArray Include additional server-side paths during comparison
--copy-dest stringArray Implies --compare-dest but also copies files from paths into destination
--cutoff-mode HARD|SOFT|CAUTIOUS Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
--ignore-case-sync Ignore case when synchronizing
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
-I, --ignore-times Don\[aq]t skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
-l, --links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
--max-duration Duration Maximum duration rclone will transfer data for (default 0s)
--max-transfer SizeSuffix Maximum size of data to transfer (default off)
-M, --metadata If set, preserve metadata when copying objects
--modify-window Duration Max time diff to be considered the same (default 1ns)
--multi-thread-chunk-size SizeSuffix Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
--multi-thread-cutoff SizeSuffix Use multi-thread downloads for files above this size (default 256Mi)
--multi-thread-streams int Number of streams to use for multi-thread downloads (default 4)
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--name-transform stringArray Transform paths during the copy process
--no-check-dest Don\[aq]t check the destination, copy regardless
--no-traverse Don\[aq]t traverse destination file system on copy
--no-update-dir-modtime Don\[aq]t update directory modification times
--no-update-modtime Don\[aq]t update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. \[aq]size,descending\[aq]
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default \[dq].partial\[dq])
--refresh-times Refresh the modtime of remote files
--server-side-across-configs Allow server-side operations (e.g. copy) to work across different configs
--size-only Skip based on size only, not modtime or checksum
--streaming-upload-cutoff SizeSuffix Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
-u, --update Skip files that are newer on the destination
\f[R]
.fi
.SS Sync Options
.PP
Flags used for sync commands
.IP
.nf
\f[C]
--backup-dir string Make backups into hierarchy based in DIR
--delete-after When synchronizing, delete files on destination after transferring (default)
--delete-before When synchronizing, delete files on destination before transferring
--delete-during When synchronizing, delete files during transfer
--fix-case Force rename of case insensitive dest to match source
--ignore-errors Delete even if there are I/O errors
--list-cutoff int To save memory, sort directory listings on disk above this threshold (default 1000000)
--max-delete int When synchronizing, limit the number of deletes (default -1)
--max-delete-size SizeSuffix When synchronizing, limit the total size of deletes (default off)
--suffix string Suffix to add to changed files
--suffix-keep-extension Preserve the extension when using --suffix
--track-renames When synchronizing, track file renames and do a server-side move if possible
--track-renames-strategy string Strategies to use when synchronizing using track-renames hash|modtime|leaf (default \[dq]hash\[dq])
\f[R]
.fi
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone move
.PP
Move files from source to dest.
.SS Synopsis
.PP
Moves the contents of the source directory to the destination directory.
Rclone will error if the source and destination overlap and the remote
does not support a server-side directory move operation.
.PP
To move single files, use the
moveto (https://rclone.org/commands/rclone_moveto/) command instead.
.PP
If no filters are in use and if possible this will server-side move
\f[V]source:path\f[R] into \f[V]dest:path\f[R].
After this \f[V]source:path\f[R] will no longer exist.
.PP
Otherwise for each file in \f[V]source:path\f[R] selected by the filters
(if any) this will move it into \f[V]dest:path\f[R].
If possible a server-side move will be used, otherwise it will copy it
(server-side if possible) into \f[V]dest:path\f[R] then delete the
original (if no errors on copy) in \f[V]source:path\f[R].
.PP
If you want to delete empty source directories after move, use the
\f[V]--delete-empty-src-dirs\f[R] flag.
.PP
See the --no-traverse (https://rclone.org/docs/#no-traverse) option for
controlling whether rclone lists the destination directory or not.
Supplying this option when moving a small number of files into a large
destination can speed transfers up greatly.
.PP
Rclone will sync the modification times of files and directories if the
backend supports it.
If metadata syncing is required then use the \f[V]--metadata\f[R] flag.
.PP
Note that the modification time and metadata for the root directory will
\f[B]not\f[R] be synced.
See <https://github.com/rclone/rclone/issues/7652> for more info.
.PP
\f[B]Important\f[R]: Since this can cause data loss, test first with the
\f[V]--dry-run\f[R] or the \f[V]--interactive\f[R]/\f[V]-i\f[R] flag.
.PP
\f[B]Note\f[R]: Use the \f[V]-P\f[R]/\f[V]--progress\f[R] flag to view
real-time transfer statistics.
.SS Logger Flags
.PP
The \f[V]--differ\f[R], \f[V]--missing-on-dst\f[R],
\f[V]--missing-on-src\f[R], \f[V]--match\f[R] and \f[V]--error\f[R]
flags write paths, one per line, to the file name (or stdout if it is
\f[V]-\f[R]) supplied.
What they write is described in the help below.
For example \f[V]--differ\f[R] will write all paths which are present on
both the source and destination but different.
.PP
The \f[V]--combined\f[R] flag will write a file (or stdout) which
contains all file paths with a symbol and then a space and then the path
to tell you what happened to it.
These are reminiscent of diff files.
.IP \[bu] 2
\f[V]= path\f[R] means path was found in source and destination and was
identical
.IP \[bu] 2
\f[V]- path\f[R] means path was missing on the source, so only in the
destination
.IP \[bu] 2
\f[V]+ path\f[R] means path was missing on the destination, so only in
the source
.IP \[bu] 2
\f[V]* path\f[R] means path was present in source and destination but
different.
.IP \[bu] 2
\f[V]! path\f[R] means there was an error reading or hashing the source
or dest.
.PP
The \f[V]--dest-after\f[R] flag writes a list file using the same format
flags as
\f[V]lsf\f[R] (https://rclone.org/commands/rclone_lsf/#synopsis)
(including customizable options for hash, modtime,
etc. (https://rclone.org/commands/rclone_lsf/#synopsis)) Conceptually it
is similar to rsync\[aq]s \f[V]--itemize-changes\f[R], but not identical
-- it should output an accurate list of what will be on the destination
after the command is finished.
.PP
When the \f[V]--no-traverse\f[R] flag is set, all logs involving files
that exist only on the destination will be incomplete or completely
missing.
.PP
Note that these logger flags have a few limitations, and certain
scenarios are not currently supported:
.IP \[bu] 2
\f[V]--max-duration\f[R] / \f[V]CutoffModeHard\f[R]
.IP \[bu] 2
\f[V]--compare-dest\f[R] / \f[V]--copy-dest\f[R]
.IP \[bu] 2
server-side moves of an entire dir at once
.IP \[bu] 2
High-level retries, because there would be duplicates (use
\f[V]--retries 1\f[R] to disable)
.IP \[bu] 2
Possibly some unusual error scenarios
.PP
Note also that each file is logged during execution, as opposed to
after, so it is most useful as a predictor of what SHOULD happen to each
file (which may or may not match what actually DID).
.IP
.nf
\f[C]
rclone move source:path dest:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--absolute Put a leading / in front of path names
--combined string Make a combined report of changes to this file
--create-empty-src-dirs Create empty source dirs on destination after move
--csv Output in CSV format
--delete-empty-src-dirs Delete empty source dirs after move
--dest-after string Report all files that exist on the dest post-sync
--differ string Report all non-matching files to this file
-d, --dir-slash Append a slash to directory names (default true)
--dirs-only Only list directories
--error string Report all files with errors (hashing or reading) to this file
--files-only Only list files (default true)
-F, --format string Output format - see lsf help for details (default \[dq]p\[dq])
--hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default \[dq]md5\[dq])
-h, --help help for move
--match string Report all matching files to this file
--missing-on-dst string Report all files missing from the destination to this file
--missing-on-src string Report all files missing from the source to this file
-s, --separator string Separator for the items in the format (default \[dq];\[dq])
-t, --timeformat string Specify a custom time format - see docs for details (default: 2006-01-02 15:04:05)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Copy Options
.PP
Flags for anything which can copy a file
.IP
.nf
\f[C]
--check-first Do all the checks before starting transfers
-c, --checksum Check for changes with size & checksum (if available, or fallback to size only)
--compare-dest stringArray Include additional server-side paths during comparison
--copy-dest stringArray Implies --compare-dest but also copies files from paths into destination
--cutoff-mode HARD|SOFT|CAUTIOUS Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
--ignore-case-sync Ignore case when synchronizing
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
-I, --ignore-times Don\[aq]t skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
-l, --links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
--max-duration Duration Maximum duration rclone will transfer data for (default 0s)
--max-transfer SizeSuffix Maximum size of data to transfer (default off)
-M, --metadata If set, preserve metadata when copying objects
--modify-window Duration Max time diff to be considered the same (default 1ns)
--multi-thread-chunk-size SizeSuffix Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
--multi-thread-cutoff SizeSuffix Use multi-thread downloads for files above this size (default 256Mi)
--multi-thread-streams int Number of streams to use for multi-thread downloads (default 4)
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--name-transform stringArray Transform paths during the copy process
--no-check-dest Don\[aq]t check the destination, copy regardless
--no-traverse Don\[aq]t traverse destination file system on copy
--no-update-dir-modtime Don\[aq]t update directory modification times
--no-update-modtime Don\[aq]t update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. \[aq]size,descending\[aq]
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default \[dq].partial\[dq])
--refresh-times Refresh the modtime of remote files
--server-side-across-configs Allow server-side operations (e.g. copy) to work across different configs
--size-only Skip based on size only, not modtime or checksum
--streaming-upload-cutoff SizeSuffix Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
-u, --update Skip files that are newer on the destination
\f[R]
.fi
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone delete
.PP
Remove the files in path.
.SS Synopsis
.PP
Remove the files in path.
Unlike purge (https://rclone.org/commands/rclone_purge/) it obeys
include/exclude filters so can be used to selectively delete files.
.PP
\f[V]rclone delete\f[R] only deletes files but leaves the directory
structure alone.
If you want to delete a directory and all of its contents use the
purge (https://rclone.org/commands/rclone_purge/) command.
.PP
If you supply the \f[V]--rmdirs\f[R] flag, it will remove all empty
directories along with it.
You can also use the separate command
rmdir (https://rclone.org/commands/rclone_rmdir/) or
rmdirs (https://rclone.org/commands/rclone_rmdirs/) to delete empty
directories only.
.PP
For example, to delete all files bigger than 100 MiB, you may first want
to check what would be deleted (use either):
.IP
.nf
\f[C]
rclone --min-size 100M lsl remote:path
rclone --dry-run --min-size 100M delete remote:path
\f[R]
.fi
.PP
Then proceed with the actual delete:
.IP
.nf
\f[C]
rclone --min-size 100M delete remote:path
\f[R]
.fi
.PP
That reads \[dq]delete everything with a minimum size of 100 MiB\[dq],
hence delete all files bigger than 100 MiB.
.PP
\f[B]Important\f[R]: Since this can cause data loss, test first with the
\f[V]--dry-run\f[R] or the \f[V]--interactive\f[R]/\f[V]-i\f[R] flag.
.IP
.nf
\f[C]
rclone delete remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for delete
--rmdirs rmdirs removes empty directories but leaves root intact
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone purge
.PP
Remove the path and all of its contents.
.SS Synopsis
.PP
Remove the path and all of its contents.
Note that this does not obey include/exclude filters - everything will
be removed.
Use the delete (https://rclone.org/commands/rclone_delete/) command if
you want to selectively delete files.
To delete empty directories only, use command
rmdir (https://rclone.org/commands/rclone_rmdir/) or
rmdirs (https://rclone.org/commands/rclone_rmdirs/).
.PP
The concurrency of this operation is controlled by the
\f[V]--checkers\f[R] global flag.
However, some backends will implement this command directly, in which
case \f[V]--checkers\f[R] will be ignored.
.PP
\f[B]Important\f[R]: Since this can cause data loss, test first with the
\f[V]--dry-run\f[R] or the \f[V]--interactive\f[R]/\f[V]-i\f[R] flag.
.IP
.nf
\f[C]
rclone purge remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for purge
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone mkdir
.PP
Make the path if it doesn\[aq]t already exist.
.IP
.nf
\f[C]
rclone mkdir remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for mkdir
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone rmdir
.PP
Remove the empty directory at path.
.SS Synopsis
.PP
This removes empty directory given by path.
Will not remove the path if it has any objects in it, not even empty
subdirectories.
Use command rmdirs (https://rclone.org/commands/rclone_rmdirs/) (or
delete (https://rclone.org/commands/rclone_delete/) with option
\f[V]--rmdirs\f[R]) to do that.
.PP
To delete a path and any objects in it, use
purge (https://rclone.org/commands/rclone_purge/) command.
.IP
.nf
\f[C]
rclone rmdir remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for rmdir
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone check
.PP
Checks the files in the source and destination match.
.SS Synopsis
.PP
Checks the files in the source and destination match.
It compares sizes and hashes (MD5 or SHA1) and logs a report of files
that don\[aq]t match.
It doesn\[aq]t alter the source or destination.
.PP
For the crypt (https://rclone.org/crypt/) remote there is a dedicated
command, cryptcheck (https://rclone.org/commands/rclone_cryptcheck/),
that are able to check the checksums of the encrypted files.
.PP
If you supply the \f[V]--size-only\f[R] flag, it will only compare the
sizes not the hashes as well.
Use this for a quick check.
.PP
If you supply the \f[V]--download\f[R] flag, it will download the data
from both remotes and check them against each other on the fly.
This can be useful for remotes that don\[aq]t support hashes or if you
really want to check all the data.
.PP
If you supply the \f[V]--checkfile HASH\f[R] flag with a valid hash
name, the \f[V]source:path\f[R] must point to a text file in the SUM
format.
.PP
If you supply the \f[V]--one-way\f[R] flag, it will only check that
files in the source match the files in the destination, not the other
way around.
This means that extra files in the destination that are not in the
source will not be detected.
.PP
The \f[V]--differ\f[R], \f[V]--missing-on-dst\f[R],
\f[V]--missing-on-src\f[R], \f[V]--match\f[R] and \f[V]--error\f[R]
flags write paths, one per line, to the file name (or stdout if it is
\f[V]-\f[R]) supplied.
What they write is described in the help below.
For example \f[V]--differ\f[R] will write all paths which are present on
both the source and destination but different.
.PP
The \f[V]--combined\f[R] flag will write a file (or stdout) which
contains all file paths with a symbol and then a space and then the path
to tell you what happened to it.
These are reminiscent of diff files.
.IP \[bu] 2
\f[V]= path\f[R] means path was found in source and destination and was
identical
.IP \[bu] 2
\f[V]- path\f[R] means path was missing on the source, so only in the
destination
.IP \[bu] 2
\f[V]+ path\f[R] means path was missing on the destination, so only in
the source
.IP \[bu] 2
\f[V]* path\f[R] means path was present in source and destination but
different.
.IP \[bu] 2
\f[V]! path\f[R] means there was an error reading or hashing the source
or dest.
.PP
The default number of parallel checks is 8.
See the --checkers (https://rclone.org/docs/#checkers-int) option for
more information.
.IP
.nf
\f[C]
rclone check source:path dest:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-C, --checkfile string Treat source:path as a SUM file with hashes of given type
--combined string Make a combined report of changes to this file
--differ string Report all non-matching files to this file
--download Check by downloading rather than with hash
--error string Report all files with errors (hashing or reading) to this file
-h, --help help for check
--match string Report all matching files to this file
--missing-on-dst string Report all files missing from the destination to this file
--missing-on-src string Report all files missing from the source to this file
--one-way Check one way only, source files must exist on remote
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Check Options
.PP
Flags used for check commands
.IP
.nf
\f[C]
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
\f[R]
.fi
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone ls
.PP
List the objects in the path with size and path.
.SS Synopsis
.PP
Lists the objects in the source path to standard output in a human
readable format with size and path.
Recurses by default.
.PP
E.g.
.IP
.nf
\f[C]
$ rclone ls swift:bucket
60295 bevajer5jef
90613 canole
94467 diwogej7
37600 fubuwic
\f[R]
.fi
.PP
Any of the filtering options can be applied to this command.
.PP
There are several related list commands
.IP \[bu] 2
\f[V]ls\f[R] to list size and path of objects only
.IP \[bu] 2
\f[V]lsl\f[R] to list modification time, size and path of objects only
.IP \[bu] 2
\f[V]lsd\f[R] to list directories only
.IP \[bu] 2
\f[V]lsf\f[R] to list objects and directories in easy to parse format
.IP \[bu] 2
\f[V]lsjson\f[R] to list objects and directories in JSON format
.PP
\f[V]ls\f[R],\f[V]lsl\f[R],\f[V]lsd\f[R] are designed to be
human-readable.
\f[V]lsf\f[R] is designed to be human and machine-readable.
\f[V]lsjson\f[R] is designed to be machine-readable.
.PP
Note that \f[V]ls\f[R] and \f[V]lsl\f[R] recurse by default - use
\f[V]--max-depth 1\f[R] to stop the recursion.
.PP
The other list commands \f[V]lsd\f[R],\f[V]lsf\f[R],\f[V]lsjson\f[R] do
not recurse by default - use \f[V]-R\f[R] to make them recurse.
.PP
On the bucket-based remotes (e.g.
s3, gcs, b2) a directory is a key prefix rather than an object, so a
listing without \f[V]-R\f[R] shows each prefix as one directory entry
and not the objects stored under it.
.PP
List commands prefer a recursive method that uses more memory but fewer
transactions by default.
Use \f[V]--disable ListR\f[R] to suppress the behavior.
See \f[V]--fast-list\f[R] (https://rclone.org/docs/#fast-list) for more
details.
.PP
Listing a nonexistent directory will produce an error except for remotes
which can\[aq]t have empty directories (e.g.
s3, swift, or gcs - the bucket-based remotes).
.IP
.nf
\f[C]
rclone ls remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for ls
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone lsd
.PP
List all directories/containers/buckets in the path.
.SS Synopsis
.PP
Lists the directories in the source path to standard output.
Does not recurse by default.
Use the \f[V]-R\f[R] flag to recurse.
.PP
This command lists the total size of the directory (if known, -1 if
not), the modification time (if known, the \f[V]--default-time\f[R] if
not), the number of objects in the directory (if known, -1 if not) and
the name of the directory, E.g.
.IP
.nf
\f[C]
$ rclone lsd swift:
494000 2018-04-26 08:43:20 10000 10000files
65 2018-04-26 08:43:20 1 1File
\f[R]
.fi
.PP
Or
.IP
.nf
\f[C]
$ rclone lsd drive:test
-1 2016-10-17 17:41:53 -1 1000files
-1 2017-01-03 14:40:54 -1 2500files
-1 2017-07-08 14:39:28 -1 4000files
\f[R]
.fi
.PP
If you just want the directory names use
\f[V]rclone lsf --dirs-only\f[R].
.PP
Any of the filtering options can be applied to this command.
.PP
There are several related list commands
.IP \[bu] 2
\f[V]ls\f[R] to list size and path of objects only
.IP \[bu] 2
\f[V]lsl\f[R] to list modification time, size and path of objects only
.IP \[bu] 2
\f[V]lsd\f[R] to list directories only
.IP \[bu] 2
\f[V]lsf\f[R] to list objects and directories in easy to parse format
.IP \[bu] 2
\f[V]lsjson\f[R] to list objects and directories in JSON format
.PP
\f[V]ls\f[R],\f[V]lsl\f[R],\f[V]lsd\f[R] are designed to be
human-readable.
\f[V]lsf\f[R] is designed to be human and machine-readable.
\f[V]lsjson\f[R] is designed to be machine-readable.
.PP
Note that \f[V]ls\f[R] and \f[V]lsl\f[R] recurse by default - use
\f[V]--max-depth 1\f[R] to stop the recursion.
.PP
The other list commands \f[V]lsd\f[R],\f[V]lsf\f[R],\f[V]lsjson\f[R] do
not recurse by default - use \f[V]-R\f[R] to make them recurse.
.PP
On the bucket-based remotes (e.g.
s3, gcs, b2) a directory is a key prefix rather than an object, so a
listing without \f[V]-R\f[R] shows each prefix as one directory entry
and not the objects stored under it.
.PP
List commands prefer a recursive method that uses more memory but fewer
transactions by default.
Use \f[V]--disable ListR\f[R] to suppress the behavior.
See \f[V]--fast-list\f[R] (https://rclone.org/docs/#fast-list) for more
details.
.PP
Listing a nonexistent directory will produce an error except for remotes
which can\[aq]t have empty directories (e.g.
s3, swift, or gcs - the bucket-based remotes).
.IP
.nf
\f[C]
rclone lsd remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for lsd
-R, --recursive Recurse into the listing
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone lsl
.PP
List the objects in path with modification time, size and path.
.SS Synopsis
.PP
Lists the objects in the source path to standard output in a human
readable format with modification time, size and path.
Recurses by default.
.PP
E.g.
.IP
.nf
\f[C]
$ rclone lsl swift:bucket
60295 2016-06-25 18:55:41.062626927 bevajer5jef
90613 2016-06-25 18:55:43.302607074 canole
94467 2016-06-25 18:55:43.046609333 diwogej7
37600 2016-06-25 18:55:40.814629136 fubuwic
\f[R]
.fi
.PP
Any of the filtering options can be applied to this command.
.PP
There are several related list commands
.IP \[bu] 2
\f[V]ls\f[R] to list size and path of objects only
.IP \[bu] 2
\f[V]lsl\f[R] to list modification time, size and path of objects only
.IP \[bu] 2
\f[V]lsd\f[R] to list directories only
.IP \[bu] 2
\f[V]lsf\f[R] to list objects and directories in easy to parse format
.IP \[bu] 2
\f[V]lsjson\f[R] to list objects and directories in JSON format
.PP
\f[V]ls\f[R],\f[V]lsl\f[R],\f[V]lsd\f[R] are designed to be
human-readable.
\f[V]lsf\f[R] is designed to be human and machine-readable.
\f[V]lsjson\f[R] is designed to be machine-readable.
.PP
Note that \f[V]ls\f[R] and \f[V]lsl\f[R] recurse by default - use
\f[V]--max-depth 1\f[R] to stop the recursion.
.PP
The other list commands \f[V]lsd\f[R],\f[V]lsf\f[R],\f[V]lsjson\f[R] do
not recurse by default - use \f[V]-R\f[R] to make them recurse.
.PP
On the bucket-based remotes (e.g.
s3, gcs, b2) a directory is a key prefix rather than an object, so a
listing without \f[V]-R\f[R] shows each prefix as one directory entry
and not the objects stored under it.
.PP
List commands prefer a recursive method that uses more memory but fewer
transactions by default.
Use \f[V]--disable ListR\f[R] to suppress the behavior.
See \f[V]--fast-list\f[R] (https://rclone.org/docs/#fast-list) for more
details.
.PP
Listing a nonexistent directory will produce an error except for remotes
which can\[aq]t have empty directories (e.g.
s3, swift, or gcs - the bucket-based remotes).
.IP
.nf
\f[C]
rclone lsl remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for lsl
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone md5sum
.PP
Produces an md5sum file for all the objects in the path.
.SS Synopsis
.PP
Produces an md5sum file for all the objects in the path.
This is in the same format as the standard md5sum tool produces.
.PP
By default, the hash is requested from the remote.
If MD5 is not supported by the remote, no hash will be returned.
With the download flag, the file will be downloaded from the remote and
hashed locally enabling MD5 for any remote.
.PP
For other algorithms, see the
hashsum (https://rclone.org/commands/rclone_hashsum/) command.
Running \f[V]rclone md5sum remote:path\f[R] is equivalent to running
\f[V]rclone hashsum MD5 remote:path\f[R].
.PP
This command can also hash data received on standard input (stdin), by
not passing a remote:path, or by passing a hyphen as remote:path when
there is data to read (if not, the hyphen will be treated literally, as
a relative path).
.IP
.nf
\f[C]
rclone md5sum remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--base64 Output base64 encoded hashsum
-C, --checkfile string Validate hashes against a given SUM file instead of printing them
--download Download the file and hash it locally; if this flag is not specified, the hash is requested from the remote
-h, --help help for md5sum
--output-file string Output hashsums to a file rather than the terminal
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone sha1sum
.PP
Produces an sha1sum file for all the objects in the path.
.SS Synopsis
.PP
Produces an sha1sum file for all the objects in the path.
This is in the same format as the standard sha1sum tool produces.
.PP
By default, the hash is requested from the remote.
If SHA-1 is not supported by the remote, no hash will be returned.
With the download flag, the file will be downloaded from the remote and
hashed locally enabling SHA-1 for any remote.
.PP
For other algorithms, see the
hashsum (https://rclone.org/commands/rclone_hashsum/) command.
Running \f[V]rclone sha1sum remote:path\f[R] is equivalent to running
\f[V]rclone hashsum SHA1 remote:path\f[R].
.PP
This command can also hash data received on standard input (stdin), by
not passing a remote:path, or by passing a hyphen as remote:path when
there is data to read (if not, the hyphen will be treated literally, as
a relative path).
.PP
This command can also hash data received on STDIN, if not passing a
remote:path.
.IP
.nf
\f[C]
rclone sha1sum remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--base64 Output base64 encoded hashsum
-C, --checkfile string Validate hashes against a given SUM file instead of printing them
--download Download the file and hash it locally; if this flag is not specified, the hash is requested from the remote
-h, --help help for sha1sum
--output-file string Output hashsums to a file rather than the terminal
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone size
.PP
Prints the total size and number of objects in remote:path.
.SS Synopsis
.PP
Counts objects in the path and calculates the total size.
Prints the result to standard output.
.PP
By default the output is in human-readable format, but shows values in
both human-readable format as well as the raw numbers (global option
\f[V]--human-readable\f[R] is not considered).
Use option \f[V]--json\f[R] to format output as JSON instead.
.PP
Recurses by default, use \f[V]--max-depth 1\f[R] to stop the recursion.
.PP
Some backends do not always provide file sizes, see for example Google
Photos (https://rclone.org/googlephotos/#size) and Google
Docs (https://rclone.org/drive/#limitations-of-google-docs).
Rclone will then show a notice in the log indicating how many such files
were encountered, and count them in as empty files in the output of the
size command.
.IP
.nf
\f[C]
rclone size remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for size
--json Format output as JSON
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone version
.PP
Show the version number.
.SS Synopsis
.PP
Show the rclone version number, the go version, the build target OS and
architecture, the runtime OS and kernel version and bitness, build tags
and the type of executable (static or dynamic).
.PP
For example:
.IP
.nf
\f[C]
$ rclone version
rclone v1.55.0
- os/version: ubuntu 18.04 (64 bit)
- os/kernel: 4.15.0-136-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.16
- go/linking: static
- go/tags: none
\f[R]
.fi
.PP
Note: before rclone version 1.55 the os/type and os/arch lines were
merged, and the \[dq]go/version\[dq] line was tagged as \[dq]go
version\[dq].
.PP
If you supply the --check flag, then it will do an online check to
compare your version with the latest release and the latest beta.
.IP
.nf
\f[C]
$ rclone version --check
yours: 1.42.0.6
latest: 1.42 (released 2018-06-16)
beta: 1.42.0.5 (released 2018-06-17)
\f[R]
.fi
.PP
Or
.IP
.nf
\f[C]
$ rclone version --check
yours: 1.41
latest: 1.42 (released 2018-06-16)
upgrade: https://downloads.rclone.org/v1.42
beta: 1.42.0.5 (released 2018-06-17)
upgrade: https://beta.rclone.org/v1.42-005-g56e1e820
\f[R]
.fi
.PP
If you supply the --deps flag then rclone will print a list of all the
packages it depends on and their versions along with some other
information about the build.
.IP
.nf
\f[C]
rclone version [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--check Check for new version
--deps Show the Go dependencies
-h, --help help for version
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone cleanup
.PP
Clean up the remote if possible.
.SS Synopsis
.PP
Clean up the remote if possible.
Empty the trash or delete old file versions.
Not supported by all remotes.
.IP
.nf
\f[C]
rclone cleanup remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for cleanup
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone dedupe
.PP
Interactively find duplicate filenames and delete/rename them.
.SS Synopsis
.PP
By default \f[V]dedupe\f[R] interactively finds files with duplicate
names and offers to delete all but one or rename them to be different.
This is known as deduping by name.
.PP
Deduping by name is only useful with a small group of backends (e.g.
Google Drive, Opendrive) that can have duplicate file names.
It can be run on wrapping backends (e.g.
crypt) if they wrap a backend which supports duplicate file names.
.PP
However if \f[V]--by-hash\f[R] is passed in then dedupe will find files
with duplicate hashes instead which will work on any backend which
supports at least one hash.
This can be used to find files with duplicate content.
This is known as deduping by hash.
.PP
If deduping by name, first rclone will merge directories with the same
name.
It will do this iteratively until all the identically named directories
have been merged.
.PP
Next, if deduping by name, for every group of duplicate file names /
hashes, it will delete all but one identical file it finds without
confirmation.
This means that for most duplicated files the \f[V]dedupe\f[R] command
will not be interactive.
.PP
\f[V]dedupe\f[R] considers files to be identical if they have the same
file path and the same hash.
If the backend does not support hashes (e.g.
crypt wrapping Google Drive) then they will never be found to be
identical.
If you use the \f[V]--size-only\f[R] flag then files will be considered
identical if they have the same size (any hash will be ignored).
This can be useful on crypt backends which do not support hashes.
.PP
Next rclone will resolve the remaining duplicates.
Exactly which action is taken depends on the dedupe mode.
By default, rclone will interactively query the user for each one.
.PP
\f[B]Important\f[R]: Since this can cause data loss, test first with the
\f[V]--dry-run\f[R] or the \f[V]--interactive\f[R]/\f[V]-i\f[R] flag.
.PP
Here is an example run.
.PP
Before - with duplicates
.IP
.nf
\f[C]
$ rclone lsl drive:dupes
6048320 2016-03-05 16:23:16.798000000 one.txt
6048320 2016-03-05 16:23:11.775000000 one.txt
564374 2016-03-05 16:23:06.731000000 one.txt
6048320 2016-03-05 16:18:26.092000000 one.txt
6048320 2016-03-05 16:22:46.185000000 two.txt
1744073 2016-03-05 16:22:38.104000000 two.txt
564374 2016-03-05 16:22:52.118000000 two.txt
\f[R]
.fi
.PP
Now the \f[V]dedupe\f[R] session
.IP
.nf
\f[C]
$ rclone dedupe drive:dupes
2016/03/05 16:24:37 Google drive root \[aq]dupes\[aq]: Looking for duplicates using interactive mode.
one.txt: Found 4 files with duplicate names
one.txt: Deleting 2/3 identical duplicates (MD5 \[dq]1eedaa9fe86fd4b8632e2ac549403b36\[dq])
one.txt: 2 duplicates remain
1: 6048320 bytes, 2016-03-05 16:23:16.798000000, MD5 1eedaa9fe86fd4b8632e2ac549403b36
2: 564374 bytes, 2016-03-05 16:23:06.731000000, MD5 7594e7dc9fc28f727c42ee3e0749de81
s) Skip and do nothing
k) Keep just one (choose which in next step)
r) Rename all to be different (by changing file.jpg to file-1.jpg)
s/k/r> k
Enter the number of the file to keep> 1
one.txt: Deleted 1 extra copies
two.txt: Found 3 files with duplicate names
two.txt: 3 duplicates remain
1: 564374 bytes, 2016-03-05 16:22:52.118000000, MD5 7594e7dc9fc28f727c42ee3e0749de81
2: 6048320 bytes, 2016-03-05 16:22:46.185000000, MD5 1eedaa9fe86fd4b8632e2ac549403b36
3: 1744073 bytes, 2016-03-05 16:22:38.104000000, MD5 851957f7fb6f0bc4ce76be966d336802
s) Skip and do nothing
k) Keep just one (choose which in next step)
r) Rename all to be different (by changing file.jpg to file-1.jpg)
s/k/r> r
two-1.txt: renamed from: two.txt
two-2.txt: renamed from: two.txt
two-3.txt: renamed from: two.txt
\f[R]
.fi
.PP
The result being
.IP
.nf
\f[C]
$ rclone lsl drive:dupes
6048320 2016-03-05 16:23:16.798000000 one.txt
564374 2016-03-05 16:22:52.118000000 two-1.txt
6048320 2016-03-05 16:22:46.185000000 two-2.txt
1744073 2016-03-05 16:22:38.104000000 two-3.txt
\f[R]
.fi
.PP
Dedupe can be run non interactively using the \f[V]--dedupe-mode\f[R]
flag or by using an extra parameter with the same value
.IP \[bu] 2
\f[V]--dedupe-mode interactive\f[R] - interactive as above.
.IP \[bu] 2
\f[V]--dedupe-mode skip\f[R] - removes identical files then skips
anything left.
.IP \[bu] 2
\f[V]--dedupe-mode first\f[R] - removes identical files then keeps the
first one.
.IP \[bu] 2
\f[V]--dedupe-mode newest\f[R] - removes identical files then keeps the
newest one.
.IP \[bu] 2
\f[V]--dedupe-mode oldest\f[R] - removes identical files then keeps the
oldest one.
.IP \[bu] 2
\f[V]--dedupe-mode largest\f[R] - removes identical files then keeps the
largest one.
.IP \[bu] 2
\f[V]--dedupe-mode smallest\f[R] - removes identical files then keeps
the smallest one.
.IP \[bu] 2
\f[V]--dedupe-mode rename\f[R] - removes identical files then renames
the rest to be different.
.IP \[bu] 2
\f[V]--dedupe-mode list\f[R] - lists duplicate dirs and files only and
changes nothing.
.PP
For example, to rename all the identically named photos in your Google
Photos directory, do
.IP
.nf
\f[C]
rclone dedupe --dedupe-mode rename \[dq]drive:Google Photos\[dq]
\f[R]
.fi
.PP
Or
.IP
.nf
\f[C]
rclone dedupe rename \[dq]drive:Google Photos\[dq]
\f[R]
.fi
.IP
.nf
\f[C]
rclone dedupe [mode] remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--by-hash Find identical hashes rather than names
--dedupe-mode string Dedupe mode interactive|skip|first|newest|oldest|largest|smallest|rename (default \[dq]interactive\[dq])
-h, --help help for dedupe
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone about
.PP
Get quota information from the remote.
.SS Synopsis
.PP
Prints quota information about a remote to standard output.
The output is typically used, free, quota and trash contents.
.PP
E.g.
Typical output from \f[V]rclone about remote:\f[R] is:
.IP
.nf
\f[C]
Total: 17 GiB
Used: 7.444 GiB
Free: 1.315 GiB
Trashed: 100.000 MiB
Other: 8.241 GiB
\f[R]
.fi
.PP
Where the fields are:
.IP \[bu] 2
Total: Total size available.
.IP \[bu] 2
Used: Total size used.
.IP \[bu] 2
Free: Total space available to this user.
.IP \[bu] 2
Trashed: Total space used by trash.
.IP \[bu] 2
Other: Total amount in other storage (e.g.
Gmail, Google Photos).
.IP \[bu] 2
Objects: Total number of objects in the storage.
.PP
All sizes are in number of bytes.
.PP
Applying a \f[V]--full\f[R] flag to the command prints the bytes in
full, e.g.
.IP
.nf
\f[C]
Total: 18253611008
Used: 7993453766
Free: 1411001220
Trashed: 104857602
Other: 8849156022
\f[R]
.fi
.PP
A \f[V]--json\f[R] flag generates conveniently machine-readable output,
e.g.
.IP
.nf
\f[C]
{
\[dq]total\[dq]: 18253611008,
\[dq]used\[dq]: 7993453766,
\[dq]trashed\[dq]: 104857602,
\[dq]other\[dq]: 8849156022,
\[dq]free\[dq]: 1411001220
}
\f[R]
.fi
.PP
Not all backends print all fields.
Information is not included if it is not provided by a backend.
Where the value is unlimited it is omitted.
.PP
Some backends does not support the \f[V]rclone about\f[R] command at
all, see complete list in
documentation (https://rclone.org/overview/#optional-features).
.IP
.nf
\f[C]
rclone about remote: [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--full Full numbers instead of human-readable
-h, --help help for about
--json Format output as JSON
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone archive
.PP
Perform an action on an archive.
.SS Synopsis
.PP
Perform an action on an archive.
Requires the use of a subcommand to specify the protocol, e.g.
.IP
.nf
\f[C]
rclone archive list remote:file.zip
\f[R]
.fi
.PP
Each subcommand has its own options which you can see in their help.
.PP
See rclone archive
create (https://rclone.org/commands/rclone_archive_create/) for the
archive formats supported.
.IP
.nf
\f[C]
rclone archive <action> [opts] <source> [<destination>] [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for archive
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.IP \[bu] 2
rclone archive
create (https://rclone.org/commands/rclone_archive_create/) - Archive
source file(s) to destination.
.IP \[bu] 2
rclone archive
extract (https://rclone.org/commands/rclone_archive_extract/) - Extract
archives from source to destination.
.IP \[bu] 2
rclone archive list (https://rclone.org/commands/rclone_archive_list/) -
List archive contents from source.
.SH rclone archive create
.PP
Archive source file(s) to destination.
.SS Synopsis
.PP
Creates an archive from the files in source:path and saves the archive
to dest:path.
If dest:path is missing, it will write to the console.
.PP
The valid formats for the \f[V]--format\f[R] flag are listed below.
If \f[V]--format\f[R] is not set rclone will guess it from the extension
of dest:path.
.PP
.TS
tab(@);
l l.
T{
Format
T}@T{
Extensions
T}
_
T{
zip
T}@T{
\&.zip
T}
T{
tar
T}@T{
\&.tar
T}
T{
tar.gz
T}@T{
\&.tar.gz, .tgz, .taz
T}
T{
tar.bz2
T}@T{
\&.tar.bz2, .tb2, .tbz, .tbz2, .tz2
T}
T{
tar.lz
T}@T{
\&.tar.lz
T}
T{
tar.lz4
T}@T{
\&.tar.lz4
T}
T{
tar.xz
T}@T{
\&.tar.xz, .txz
T}
T{
tar.zst
T}@T{
\&.tar.zst, .tzst
T}
T{
tar.br
T}@T{
\&.tar.br
T}
T{
tar.sz
T}@T{
\&.tar.sz
T}
T{
tar.mz
T}@T{
\&.tar.mz
T}
.TE
.PP
The \f[V]--prefix\f[R] and \f[V]--full-path\f[R] flags control the
prefix for the files in the archive.
.PP
If the flag \f[V]--full-path\f[R] is set then the files will have the
full source path as the prefix.
.PP
If the flag \f[V]--prefix=<value>\f[R] is set then the files will have
\f[V]<value>\f[R] as prefix.
It\[aq]s possible to create invalid file names with
\f[V]--prefix=<value>\f[R] so use with caution.
Flag \f[V]--prefix\f[R] has priority over \f[V]--full-path\f[R].
.PP
Given a directory \f[V]/sourcedir\f[R] with the following:
.IP
.nf
\f[C]
file1.txt
dir1/file2.txt
\f[R]
.fi
.PP
Running the command
\f[V]rclone archive create /sourcedir /dest.tar.gz\f[R] will make an
archive with the contents:
.IP
.nf
\f[C]
file1.txt
dir1/
dir1/file2.txt
\f[R]
.fi
.PP
Running the command
\f[V]rclone archive create --full-path /sourcedir /dest.tar.gz\f[R] will
make an archive with the contents:
.IP
.nf
\f[C]
sourcedir/file1.txt
sourcedir/dir1/
sourcedir/dir1/file2.txt
\f[R]
.fi
.PP
Running the command
\f[V]rclone archive create --prefix=my_new_path /sourcedir /dest.tar.gz\f[R]
will make an archive with the contents:
.IP
.nf
\f[C]
my_new_path/file1.txt
my_new_path/dir1/
my_new_path/dir1/file2.txt
\f[R]
.fi
.IP
.nf
\f[C]
rclone archive create [flags] <source> [<destination>]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--format string Create the archive with format or guess from extension.
--full-path Set prefix for files in archive to source path
-h, --help help for create
--prefix string Set prefix for files in archive to entered value or source path
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone archive (https://rclone.org/commands/rclone_archive/) - Perform
an action on an archive.
.SH rclone archive extract
.PP
Extract archives from source to destination.
.SS Synopsis
.PP
Extract the archive contents to a destination directory auto detecting
the format.
See rclone archive
create (https://rclone.org/commands/rclone_archive_create/) for the
archive formats supported.
.PP
For example on this archive:
.IP
.nf
\f[C]
$ rclone archive list --long remote:archive.zip
6 2025-10-30 09:46:23.000000000 file.txt
0 2025-10-30 09:46:57.000000000 dir/
4 2025-10-30 09:46:57.000000000 dir/bye.txt
\f[R]
.fi
.PP
You can run extract like this
.IP
.nf
\f[C]
$ rclone archive extract remote:archive.zip remote:extracted
\f[R]
.fi
.PP
Which gives this result
.IP
.nf
\f[C]
$ rclone tree remote:extracted
/
├── dir
│ └── bye.txt
└── file.txt
\f[R]
.fi
.PP
The source or destination or both can be local or remote.
.PP
Filters can be used to only extract certain files:
.IP
.nf
\f[C]
$ rclone archive extract archive.zip partial --include \[dq]bye.*\[dq]
$ rclone tree partial
/
└── dir
└── bye.txt
\f[R]
.fi
.PP
The archive backend (https://rclone.org/archive/) can also be used to
extract files.
It can be used to read only mount archives also but it supports a
different set of archive formats to the archive commands.
.IP
.nf
\f[C]
rclone archive extract [flags] <source> <destination>
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for extract
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone archive (https://rclone.org/commands/rclone_archive/) - Perform
an action on an archive.
.SH rclone archive list
.PP
List archive contents from source.
.SS Synopsis
.PP
List the contents of an archive to the console, auto detecting the
format.
See rclone archive
create (https://rclone.org/commands/rclone_archive_create/) for the
archive formats supported.
.PP
For example:
.IP
.nf
\f[C]
$ rclone archive list remote:archive.zip
6 file.txt
0 dir/
4 dir/bye.txt
\f[R]
.fi
.PP
Or with \f[V]--long\f[R] flag for more info:
.IP
.nf
\f[C]
$ rclone archive list --long remote:archive.zip
6 2025-10-30 09:46:23.000000000 file.txt
0 2025-10-30 09:46:57.000000000 dir/
4 2025-10-30 09:46:57.000000000 dir/bye.txt
\f[R]
.fi
.PP
Or with \f[V]--plain\f[R] flag which is useful for scripting:
.IP
.nf
\f[C]
$ rclone archive list --plain /path/to/archive.zip
file.txt
dir/
dir/bye.txt
\f[R]
.fi
.PP
Or with \f[V]--dirs-only\f[R]:
.IP
.nf
\f[C]
$ rclone archive list --plain --dirs-only /path/to/archive.zip
dir/
\f[R]
.fi
.PP
Or with \f[V]--files-only\f[R]:
.IP
.nf
\f[C]
$ rclone archive list --plain --files-only /path/to/archive.zip
file.txt
dir/bye.txt
\f[R]
.fi
.PP
Filters may also be used:
.IP
.nf
\f[C]
$ rclone archive list --long archive.zip --include \[dq]bye.*\[dq]
4 2025-10-30 09:46:57.000000000 dir/bye.txt
\f[R]
.fi
.PP
The archive backend (https://rclone.org/archive/) can also be used to
list files.
It can be used to read only mount archives also but it supports a
different set of archive formats to the archive commands.
.IP
.nf
\f[C]
rclone archive list [flags] <source>
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--dirs-only Only list directories
--files-only Only list files
-h, --help help for list
--long List extra attributtes
--plain Only list file names
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone archive (https://rclone.org/commands/rclone_archive/) - Perform
an action on an archive.
.SH rclone authorize
.PP
Remote authorization.
.SS Synopsis
.PP
Remote authorization.
Used to authorize a remote or headless rclone from a machine with a
browser.
Use as instructed by rclone config.
See also the remote setup documentation.
.PP
The command requires 1-3 arguments:
.IP \[bu] 2
Name of a backend (e.g.
\[dq]drive\[dq], \[dq]s3\[dq])
.IP \[bu] 2
Either a base64 encoded JSON blob obtained from a previous rclone config
session
.IP \[bu] 2
Or a client_id and client_secret pair obtained from the remote service
.PP
Use --auth-no-open-browser to prevent rclone to open auth link in
default browser automatically.
.PP
Use --template to generate HTML output via a custom Go template.
If a blank string is provided as an argument to this flag, the default
template is used.
.IP
.nf
\f[C]
rclone authorize <backendname> [base64_json_blob | client_id client_secret] [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--auth-no-open-browser Do not automatically open auth link in default browser
-h, --help help for authorize
--template string The path to a custom Go template for generating HTML responses
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone backend
.PP
Run a backend-specific command.
.SS Synopsis
.PP
This runs a backend-specific command.
The commands themselves (except for \[dq]help\[dq] and
\[dq]features\[dq]) are defined by the backends and you should see the
backend docs for definitions.
.PP
You can discover what commands a backend implements by using
.IP
.nf
\f[C]
rclone backend help remote:
rclone backend help <backendname>
\f[R]
.fi
.PP
You can also discover information about the backend using (see
operations/fsinfo (https://rclone.org/rc/#operations-fsinfo) in the
remote control docs for more info).
.IP
.nf
\f[C]
rclone backend features remote:
\f[R]
.fi
.PP
Pass options to the backend command with -o.
This should be key=value or key, e.g.:
.IP
.nf
\f[C]
rclone backend stats remote:path stats -o format=json -o long
\f[R]
.fi
.PP
Pass arguments to the backend by placing them on the end of the line
.IP
.nf
\f[C]
rclone backend cleanup remote:path file1 file2 file3
\f[R]
.fi
.PP
Note to run these commands on a running backend then see
backend/command (https://rclone.org/rc/#backend-command) in the rc docs.
.IP
.nf
\f[C]
rclone backend <command> remote:path [opts] <args> [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for backend
--json Always output in JSON format
-o, --option stringArray Option in the form name=value or name
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone bisync
.PP
Perform bidirectional synchronization between two paths.
.SS Synopsis
.PP
Perform bidirectional synchronization between two paths.
.PP
Bisync (https://rclone.org/bisync/) provides a bidirectional cloud sync
solution in rclone.
It retains the Path1 and Path2 filesystem listings from the prior run.
On each successive run it will:
.IP \[bu] 2
list files on Path1 and Path2, and check for changes on each side.
Changes include \f[V]New\f[R], \f[V]Newer\f[R], \f[V]Older\f[R], and
\f[V]Deleted\f[R] files.
.IP \[bu] 2
Propagate changes on Path1 to Path2, and vice-versa.
.PP
Bisync is considered an \f[B]advanced command\f[R], so use with care.
Make sure you have read and understood the entire
manual (https://rclone.org/bisync) (especially the
Limitations (https://rclone.org/bisync/#limitations) section) before
using, or data loss can result.
Questions can be asked in the Rclone Forum (https://forum.rclone.org/).
.PP
See full bisync description (https://rclone.org/bisync/) for details.
.IP
.nf
\f[C]
rclone bisync remote1:path1 remote2:path2 [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--backup-dir1 string --backup-dir for Path1. Must be a non-overlapping path on the same remote.
--backup-dir2 string --backup-dir for Path2. Must be a non-overlapping path on the same remote.
--check-access Ensure expected RCLONE_TEST files are found on both Path1 and Path2 filesystems, else abort.
--check-filename string Filename for --check-access (default: RCLONE_TEST)
--check-sync string Controls comparison of final listings: true|false|only (default: true) (default \[dq]true\[dq])
--compare string Comma-separated list of bisync-specific compare options ex. \[aq]size,modtime,checksum\[aq] (default: \[aq]size,modtime\[aq])
--conflict-loser ConflictLoserAction Action to take on the loser of a sync conflict (when there is a winner) or on both files (when there is no winner): , num, pathname, delete (default: num)
--conflict-resolve string Automatically resolve conflicts by preferring the version that is: none, path1, path2, newer, older, larger, smaller (default: none) (default \[dq]none\[dq])
--conflict-suffix string Suffix to use when renaming a --conflict-loser. Can be either one string or two comma-separated strings to assign different suffixes to Path1/Path2. (default: \[aq]conflict\[aq])
--create-empty-src-dirs Sync creation and deletion of empty directories. (Not compatible with --remove-empty-dirs)
--download-hash Compute hash by downloading when otherwise unavailable. (warning: may be slow and use lots of data!)
--filters-file string Read filtering patterns from a file
--force Bypass --max-delete safety check and run the sync. Consider using with --verbose
-h, --help help for bisync
--ignore-listing-checksum Do not use checksums for listings (add --ignore-checksum to additionally skip post-copy checksum checks)
--max-delete-renames-aware Exclude tracked renames from the --max-delete safety check (requires --track-renames)
--max-lock Duration Consider lock files older than this to be expired (default: 0 (never expire)) (minimum: 2m) (default 0s)
--no-cleanup Retain working files (useful for troubleshooting and testing).
--no-slow-hash Ignore listing checksums only on backends where they are slow
--recover Automatically recover from interruptions without requiring --resync.
--remove-empty-dirs Remove ALL empty directories at the final cleanup step.
--resilient Allow future runs to retry after certain less-serious errors, instead of requiring --resync.
-1, --resync Performs the resync run. Equivalent to --resync-mode path1. Consider using --verbose or --dry-run first.
--resync-mode string During resync, prefer the version that is: path1, path2, newer, older, larger, smaller (default: path1 if --resync, otherwise none for no resync.) (default \[dq]none\[dq])
--slow-hash-sync-only Ignore slow checksums for listings and deltas, but still consider them during sync calls.
--workdir string Use custom working dir - useful for testing. (default: $HOME/.cache/rclone/bisync)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Copy Options
.PP
Flags for anything which can copy a file
.IP
.nf
\f[C]
--check-first Do all the checks before starting transfers
-c, --checksum Check for changes with size & checksum (if available, or fallback to size only)
--compare-dest stringArray Include additional server-side paths during comparison
--copy-dest stringArray Implies --compare-dest but also copies files from paths into destination
--cutoff-mode HARD|SOFT|CAUTIOUS Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
--ignore-case-sync Ignore case when synchronizing
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
-I, --ignore-times Don\[aq]t skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
-l, --links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
--max-duration Duration Maximum duration rclone will transfer data for (default 0s)
--max-transfer SizeSuffix Maximum size of data to transfer (default off)
-M, --metadata If set, preserve metadata when copying objects
--modify-window Duration Max time diff to be considered the same (default 1ns)
--multi-thread-chunk-size SizeSuffix Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
--multi-thread-cutoff SizeSuffix Use multi-thread downloads for files above this size (default 256Mi)
--multi-thread-streams int Number of streams to use for multi-thread downloads (default 4)
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--name-transform stringArray Transform paths during the copy process
--no-check-dest Don\[aq]t check the destination, copy regardless
--no-traverse Don\[aq]t traverse destination file system on copy
--no-update-dir-modtime Don\[aq]t update directory modification times
--no-update-modtime Don\[aq]t update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. \[aq]size,descending\[aq]
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default \[dq].partial\[dq])
--refresh-times Refresh the modtime of remote files
--server-side-across-configs Allow server-side operations (e.g. copy) to work across different configs
--size-only Skip based on size only, not modtime or checksum
--streaming-upload-cutoff SizeSuffix Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
-u, --update Skip files that are newer on the destination
\f[R]
.fi
.SS Sync Options
.PP
Flags used for sync commands
.IP
.nf
\f[C]
--backup-dir string Make backups into hierarchy based in DIR
--delete-after When synchronizing, delete files on destination after transferring (default)
--delete-before When synchronizing, delete files on destination before transferring
--delete-during When synchronizing, delete files during transfer
--fix-case Force rename of case insensitive dest to match source
--ignore-errors Delete even if there are I/O errors
--list-cutoff int To save memory, sort directory listings on disk above this threshold (default 1000000)
--max-delete int When synchronizing, limit the number of deletes (default -1)
--max-delete-size SizeSuffix When synchronizing, limit the total size of deletes (default off)
--suffix string Suffix to add to changed files
--suffix-keep-extension Preserve the extension when using --suffix
--track-renames When synchronizing, track file renames and do a server-side move if possible
--track-renames-strategy string Strategies to use when synchronizing using track-renames hash|modtime|leaf (default \[dq]hash\[dq])
\f[R]
.fi
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone cat
.PP
Concatenates any files and sends them to stdout.
.SS Synopsis
.PP
Sends any files to standard output.
.PP
You can use it like this to output a single file
.IP
.nf
\f[C]
rclone cat remote:path/to/file
\f[R]
.fi
.PP
Or like this to output any file in dir or its subdirectories.
.IP
.nf
\f[C]
rclone cat remote:path/to/dir
\f[R]
.fi
.PP
Or like this to output any .txt files in dir or its subdirectories.
.IP
.nf
\f[C]
rclone --include \[dq]*.txt\[dq] cat remote:path/to/dir
\f[R]
.fi
.PP
Use the \f[V]--head\f[R] flag to print characters only at the start,
\f[V]--tail\f[R] for the end and \f[V]--offset\f[R] and
\f[V]--count\f[R] to print a section in the middle.
Note that if offset is negative it will count from the end, so
\f[V]--offset -1 --count 1\f[R] is equivalent to \f[V]--tail 1\f[R].
.PP
Use the \f[V]--separator\f[R] flag to print a separator value between
files.
Be sure to shell-escape special characters.
For example, to print a newline between files, use:
.IP \[bu] 2
bash:
.RS 2
.IP
.nf
\f[C]
rclone --include \[dq]*.txt\[dq] --separator $\[aq]\[rs]n\[aq] cat remote:path/to/dir
\f[R]
.fi
.RE
.IP \[bu] 2
powershell:
.RS 2
.IP
.nf
\f[C]
rclone --include \[dq]*.txt\[dq] --separator \[dq]\[ga]n\[dq] cat remote:path/to/dir
\f[R]
.fi
.RE
.IP
.nf
\f[C]
rclone cat remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--count int Only print N characters (default -1)
--discard Discard the output instead of printing
--head int Only print the first N characters
-h, --help help for cat
--offset int Start printing at offset N (or from end if -ve)
--separator string Separator to use between objects when printing multiple files
--tail int Only print the last N characters
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone checksum
.PP
Checks the files in the destination against a SUM file.
.SS Synopsis
.PP
Checks that hashsums of destination files match the SUM file.
It compares hashes (MD5, SHA1, etc) and logs a report of files which
don\[aq]t match.
It doesn\[aq]t alter the file system.
.PP
The sumfile is treated as the source and the dst:path is treated as the
destination for the purposes of the output.
.PP
If you supply the \f[V]--download\f[R] flag, it will download the data
from the remote and calculate the content hash on the fly.
This can be useful for remotes that don\[aq]t support hashes or if you
really want to check all the data.
.PP
Note that hash values in the SUM file are treated as case insensitive.
.PP
If you supply the \f[V]--one-way\f[R] flag, it will only check that
files in the source match the files in the destination, not the other
way around.
This means that extra files in the destination that are not in the
source will not be detected.
.PP
The \f[V]--differ\f[R], \f[V]--missing-on-dst\f[R],
\f[V]--missing-on-src\f[R], \f[V]--match\f[R] and \f[V]--error\f[R]
flags write paths, one per line, to the file name (or stdout if it is
\f[V]-\f[R]) supplied.
What they write is described in the help below.
For example \f[V]--differ\f[R] will write all paths which are present on
both the source and destination but different.
.PP
The \f[V]--combined\f[R] flag will write a file (or stdout) which
contains all file paths with a symbol and then a space and then the path
to tell you what happened to it.
These are reminiscent of diff files.
.IP \[bu] 2
\f[V]= path\f[R] means path was found in source and destination and was
identical
.IP \[bu] 2
\f[V]- path\f[R] means path was missing on the source, so only in the
destination
.IP \[bu] 2
\f[V]+ path\f[R] means path was missing on the destination, so only in
the source
.IP \[bu] 2
\f[V]* path\f[R] means path was present in source and destination but
different.
.IP \[bu] 2
\f[V]! path\f[R] means there was an error reading or hashing the source
or dest.
.PP
The default number of parallel checks is 8.
See the --checkers (https://rclone.org/docs/#checkers-int) option for
more information.
.IP
.nf
\f[C]
rclone checksum <hash> sumfile dst:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--combined string Make a combined report of changes to this file
--differ string Report all non-matching files to this file
--download Check by hashing the contents
--error string Report all files with errors (hashing or reading) to this file
-h, --help help for checksum
--match string Report all matching files to this file
--missing-on-dst string Report all files missing from the destination to this file
--missing-on-src string Report all files missing from the source to this file
--one-way Check one way only, source files must exist on remote
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone completion
.PP
Output completion script for a given shell.
.SS Synopsis
.PP
Generates a shell completion script for rclone.
Run with \f[V]--help\f[R] to list the supported shells.
Enum-valued flags such as \f[V]--log-level\f[R] and
\f[V]--vfs-cache-mode\f[R] also complete their supported values.
.SS Options
.IP
.nf
\f[C]
-h, --help help for completion
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.IP \[bu] 2
rclone completion
bash (https://rclone.org/commands/rclone_completion_bash/) - Output bash
completion script for rclone.
.IP \[bu] 2
rclone completion
fish (https://rclone.org/commands/rclone_completion_fish/) - Output fish
completion script for rclone.
.IP \[bu] 2
rclone completion
powershell (https://rclone.org/commands/rclone_completion_powershell/) -
Output powershell completion script for rclone.
.IP \[bu] 2
rclone completion
zsh (https://rclone.org/commands/rclone_completion_zsh/) - Output zsh
completion script for rclone.
.SH rclone completion bash
.PP
Output bash completion script for rclone.
.SS Synopsis
.PP
Generates a bash shell autocompletion script for rclone.
.PP
By default, when run without any arguments,
.IP
.nf
\f[C]
rclone completion bash
\f[R]
.fi
.PP
the generated script will be written to
.IP
.nf
\f[C]
/etc/bash_completion.d/rclone
\f[R]
.fi
.PP
and so rclone will probably need to be run as root, or with sudo.
.PP
If you supply a path to a file as the command line argument, then the
generated script will be written to that file, in which case you should
not need root privileges.
.PP
If output_file is \[dq]-\[dq], then the output will be written to
stdout.
.PP
If you have installed the script into the default location, you can
logout and login again to use the autocompletion script.
.PP
Alternatively, you can source the script directly
.IP
.nf
\f[C]
\&. /path/to/my_bash_completion_scripts/rclone
\f[R]
.fi
.PP
and the autocompletion functionality will be added to your current
shell.
.IP
.nf
\f[C]
rclone completion bash [output_file] [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for bash
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone completion (https://rclone.org/commands/rclone_completion/) -
Output completion script for a given shell.
.SH rclone completion fish
.PP
Output fish completion script for rclone.
.SS Synopsis
.PP
Generates a fish autocompletion script for rclone.
.PP
This writes to /etc/fish/completions/rclone.fish by default so will
probably need to be run with sudo or as root, e.g.
.IP
.nf
\f[C]
sudo rclone completion fish
\f[R]
.fi
.PP
Logout and login again to use the autocompletion scripts, or source them
directly
.IP
.nf
\f[C]
\&. /etc/fish/completions/rclone.fish
\f[R]
.fi
.PP
If you supply a command line argument the script will be written there.
.PP
If output_file is \[dq]-\[dq], then the output will be written to
stdout.
.IP
.nf
\f[C]
rclone completion fish [output_file] [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for fish
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone completion (https://rclone.org/commands/rclone_completion/) -
Output completion script for a given shell.
.SH rclone completion powershell
.PP
Output powershell completion script for rclone.
.SS Synopsis
.PP
Generate the autocompletion script for powershell.
.PP
To load completions in your current shell session:
.IP
.nf
\f[C]
rclone completion powershell | Out-String | Invoke-Expression
\f[R]
.fi
.PP
To load completions for every new session, add the output of the above
command to your powershell profile.
.PP
If output_file is \[dq]-\[dq] or missing, then the output will be
written to stdout.
.IP
.nf
\f[C]
rclone completion powershell [output_file] [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for powershell
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone completion (https://rclone.org/commands/rclone_completion/) -
Output completion script for a given shell.
.SH rclone completion zsh
.PP
Output zsh completion script for rclone.
.SS Synopsis
.PP
Generates a zsh autocompletion script for rclone.
.PP
This writes to /usr/share/zsh/vendor-completions/_rclone by default so
will probably need to be run with sudo or as root, e.g.
.IP
.nf
\f[C]
sudo rclone completion zsh
\f[R]
.fi
.PP
Logout and login again to use the autocompletion scripts, or source them
directly
.IP
.nf
\f[C]
autoload -U compinit && compinit
\f[R]
.fi
.PP
If you supply a command line argument the script will be written there.
.PP
If output_file is \[dq]-\[dq], then the output will be written to
stdout.
.IP
.nf
\f[C]
rclone completion zsh [output_file] [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for zsh
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone completion (https://rclone.org/commands/rclone_completion/) -
Output completion script for a given shell.
.SH rclone config create
.PP
Create a new remote with name, type and options.
.SS Synopsis
.PP
Create a new remote of \f[V]name\f[R] with \f[V]type\f[R] and options.
The options should be passed in pairs of \f[V]key\f[R] \f[V]value\f[R]
or as \f[V]key=value\f[R].
.PP
For example, to make a swift remote of name myremote using auto config
you would do:
.IP
.nf
\f[C]
rclone config create myremote swift env_auth true
rclone config create myremote swift env_auth=true
\f[R]
.fi
.PP
So for example if you wanted to configure a Google Drive remote but
using remote authorization you would do this:
.IP
.nf
\f[C]
rclone config create mydrive drive config_is_local=false
\f[R]
.fi
.PP
Note that if the config process would normally ask a question the
default is taken (unless \f[V]--non-interactive\f[R] is used).
Each time that happens rclone will print or DEBUG a message saying how
to affect the value taken.
.PP
If any of the parameters passed is a password field, then rclone will
automatically obscure them if they aren\[aq]t already obscured before
putting them in the config file.
.PP
\f[B]NB\f[R] If the password parameter is 22 characters or longer and
consists only of base64 characters then rclone can get confused about
whether the password is already obscured or not and put unobscured
passwords into the config file.
If you want to be 100% certain that the passwords get obscured then use
the \f[V]--obscure\f[R] flag, or if you are 100% certain you are already
passing obscured passwords then use \f[V]--no-obscure\f[R].
You can also set obscured passwords using the
\f[V]rclone config password\f[R] command.
.PP
The flag \f[V]--non-interactive\f[R] is for use by applications that
wish to configure rclone themselves, rather than using rclone\[aq]s text
based configuration questions.
If this flag is set, and rclone needs to ask the user a question, a JSON
blob will be returned with the question in it.
.PP
This will look something like (some irrelevant detail removed):
.IP
.nf
\f[C]
{
\[dq]State\[dq]: \[dq]*oauth-islocal,teamdrive,,\[dq],
\[dq]Option\[dq]: {
\[dq]Name\[dq]: \[dq]config_is_local\[dq],
\[dq]Help\[dq]: \[dq]Use web browser to automatically authenticate rclone with remote?\[rs]n * Say Y if the machine running rclone has a web browser you can use\[rs]n * Say N if running rclone on a (remote) machine without web browser access\[rs]nIf not sure try Y. If Y failed, try N.\[rs]n\[dq],
\[dq]Default\[dq]: true,
\[dq]Examples\[dq]: [
{
\[dq]Value\[dq]: \[dq]true\[dq],
\[dq]Help\[dq]: \[dq]Yes\[dq]
},
{
\[dq]Value\[dq]: \[dq]false\[dq],
\[dq]Help\[dq]: \[dq]No\[dq]
}
],
\[dq]Required\[dq]: false,
\[dq]IsPassword\[dq]: false,
\[dq]Type\[dq]: \[dq]bool\[dq],
\[dq]Exclusive\[dq]: true,
},
\[dq]Error\[dq]: \[dq]\[dq],
}
\f[R]
.fi
.PP
The format of \f[V]Option\f[R] is the same as returned by
\f[V]rclone config providers\f[R].
The question should be asked to the user and returned to rclone as the
\f[V]--result\f[R] option along with the \f[V]--state\f[R] parameter.
.PP
The keys of \f[V]Option\f[R] are used as follows:
.IP \[bu] 2
\f[V]Name\f[R] - name of variable - show to user
.IP \[bu] 2
\f[V]Help\f[R] - help text.
Hard wrapped at 80 chars.
Any URLs should be clicky.
.IP \[bu] 2
\f[V]Default\f[R] - default value - return this if the user just wants
the default.
.IP \[bu] 2
\f[V]Examples\f[R] - the user should be able to choose one of these
.IP \[bu] 2
\f[V]Required\f[R] - the value should be non-empty
.IP \[bu] 2
\f[V]IsPassword\f[R] - the value is a password and should be edited as
such
.IP \[bu] 2
\f[V]Type\f[R] - type of value, eg \f[V]bool\f[R], \f[V]string\f[R],
\f[V]int\f[R] and others
.IP \[bu] 2
\f[V]Exclusive\f[R] - if set no free-form entry allowed only the
\f[V]Examples\f[R]
.IP \[bu] 2
Irrelevant keys \f[V]Provider\f[R], \f[V]ShortOpt\f[R], \f[V]Hide\f[R],
\f[V]NoPrefix\f[R], \f[V]Advanced\f[R]
.PP
If \f[V]Error\f[R] is set then it should be shown to the user at the
same time as the question.
.IP
.nf
\f[C]
rclone config update name --continue --state \[dq]*oauth-islocal,teamdrive,,\[dq] --result \[dq]true\[dq]
\f[R]
.fi
.PP
Note that when using \f[V]--continue\f[R] all passwords should be passed
in the clear (not obscured).
Any default config values should be passed in with each invocation of
\f[V]--continue\f[R].
.PP
At the end of the non interactive process, rclone will return a result
with \f[V]State\f[R] as empty string.
.PP
If \f[V]--all\f[R] is passed then rclone will ask all the config
questions, not just the post config questions.
Any parameters are used as defaults for questions as usual.
.PP
Note that \f[V]bin/config.py\f[R] in the rclone source implements this
protocol as a readable demonstration.
.IP
.nf
\f[C]
rclone config create name type [key value]* [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--all Ask the full set of config questions
--continue Continue the configuration process with an answer
-h, --help help for create
--no-obscure Force any passwords not to be obscured
--no-output Don\[aq]t provide any output
--non-interactive Don\[aq]t interact with user and return questions
--obscure Force any passwords to be obscured
--result string Result - use with --continue
--state string State - use with --continue
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone config delete
.PP
Delete an existing remote.
.IP
.nf
\f[C]
rclone config delete name [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for delete
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone config disconnect
.PP
Disconnects user from remote
.SS Synopsis
.PP
This disconnects the remote: passed in to the cloud storage system.
.PP
This normally means revoking the oauth token.
.PP
To reconnect use \[dq]rclone config reconnect\[dq].
.IP
.nf
\f[C]
rclone config disconnect remote: [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for disconnect
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone config dump
.PP
Dump the config file as JSON.
.IP
.nf
\f[C]
rclone config dump [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for dump
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone config edit
.PP
Enter an interactive configuration session.
.SS Synopsis
.PP
Enter an interactive configuration session where you can setup new
remotes and manage existing ones.
You may also set or remove a password to protect your configuration.
.IP
.nf
\f[C]
rclone config edit [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for edit
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone config encryption
.PP
set, remove and check the encryption for the config file
.SS Synopsis
.PP
This command sets, clears and checks the encryption for the config file
using the subcommands below.
.SS Options
.IP
.nf
\f[C]
-h, --help help for encryption
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.IP \[bu] 2
rclone config encryption
check (https://rclone.org/commands/rclone_config_encryption_check/) -
Check that the config file is encrypted
.IP \[bu] 2
rclone config encryption
remove (https://rclone.org/commands/rclone_config_encryption_remove/) -
Remove the config file encryption password
.IP \[bu] 2
rclone config encryption
set (https://rclone.org/commands/rclone_config_encryption_set/) - Set or
change the config file encryption password
.SH rclone config encryption check
.PP
Check that the config file is encrypted
.SS Synopsis
.PP
This checks the config file is encrypted and that you can decrypt it.
.PP
It will attempt to decrypt the config using the password you supply.
.PP
If decryption fails it will return a non-zero exit code if using
\f[V]--password-command\f[R], otherwise it will prompt again for the
password.
.PP
If the config file is not encrypted it will return a non zero exit code.
.IP
.nf
\f[C]
rclone config encryption check [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for check
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config
encryption (https://rclone.org/commands/rclone_config_encryption/) -
set, remove and check the encryption for the config file
.SH rclone config encryption remove
.PP
Remove the config file encryption password
.SS Synopsis
.PP
Remove the config file encryption password
.PP
This removes the config file encryption, returning it to un-encrypted.
.PP
If \f[V]--password-command\f[R] is in use, this will be called to supply
the old config password.
.PP
If the config was not encrypted then no error will be returned and this
command will do nothing.
.IP
.nf
\f[C]
rclone config encryption remove [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for remove
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config
encryption (https://rclone.org/commands/rclone_config_encryption/) -
set, remove and check the encryption for the config file
.SH rclone config encryption set
.PP
Set or change the config file encryption password
.SS Synopsis
.PP
This command sets or changes the config file encryption password.
.PP
If there was no config password set then it sets a new one, otherwise it
changes the existing config password.
.PP
Note that if you are changing an encryption password using
\f[V]--password-command\f[R] then this will be called once to decrypt
the config using the old password and then again to read the new
password to re-encrypt the config.
.PP
When \f[V]--password-command\f[R] is called to change the password then
the environment variable \f[V]RCLONE_PASSWORD_CHANGE=1\f[R] will be set.
So if changing passwords programmatically you can use the environment
variable to distinguish which password you must supply.
.PP
Alternatively you can remove the password first (with
\f[V]rclone config encryption remove\f[R]), then set it again with this
command which may be easier if you don\[aq]t mind the unencrypted config
file being on the disk briefly.
.IP
.nf
\f[C]
rclone config encryption set [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for set
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config
encryption (https://rclone.org/commands/rclone_config_encryption/) -
set, remove and check the encryption for the config file
.SH rclone config file
.PP
Show path of configuration file in use.
.IP
.nf
\f[C]
rclone config file [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for file
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone config password
.PP
Update password in an existing remote.
.SS Synopsis
.PP
Update an existing remote\[aq]s password.
The password should be passed in pairs of \f[V]key\f[R]
\f[V]password\f[R] or as \f[V]key=password\f[R].
The \f[V]password\f[R] should be passed in in clear (unobscured).
.PP
For example, to set password of a remote of name myremote you would do:
.IP
.nf
\f[C]
rclone config password myremote fieldname mypassword
rclone config password myremote fieldname=mypassword
\f[R]
.fi
.PP
This command is obsolete now that \[dq]config update\[dq] and
\[dq]config create\[dq] both support obscuring passwords directly.
.IP
.nf
\f[C]
rclone config password name [key value]+ [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for password
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone config paths
.PP
Show paths used for configuration, cache, temp etc.
.IP
.nf
\f[C]
rclone config paths [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for paths
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone config providers
.PP
List in JSON format all the providers and options.
.IP
.nf
\f[C]
rclone config providers [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for providers
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone config reconnect
.PP
Re-authenticates user with remote.
.SS Synopsis
.PP
This reconnects remote: passed in to the cloud storage system.
.PP
To disconnect the remote use \[dq]rclone config disconnect\[dq].
.PP
This normally means going through the interactive oauth flow again.
.IP
.nf
\f[C]
rclone config reconnect remote: [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for reconnect
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone config redacted
.PP
Print redacted (decrypted) config file, or the redacted config for a
single remote.
.SS Synopsis
.PP
This prints a redacted copy of the config file, either the whole config
file or for a given remote.
.PP
The config file will be redacted by replacing all passwords and other
sensitive info with XXX.
.PP
This makes the config file suitable for posting online for support.
.PP
It should be double checked before posting as the redaction may not be
perfect.
.IP
.nf
\f[C]
rclone config redacted [<remote>] [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for redacted
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone config show
.PP
Print (decrypted) config file, or the config for a single remote.
.IP
.nf
\f[C]
rclone config show [<remote>] [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for show
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone config string
.PP
Print connection string for a single remote.
.SS Synopsis
.PP
Print a connection string for a single remote.
.PP
The connection strings (https://rclone.org/docs/#connection-strings) can
be used wherever a remote is needed and can be more convenient than
using the config file, especially if using the RC API.
.PP
Backend parameters may be provided to the command also.
.PP
Example:
.IP
.nf
\f[C]
$ rclone config string s3:rclone --s3-no-check-bucket
:s3,access_key_id=XXX,no_check_bucket,provider=AWS,region=eu-west-2,secret_access_key=YYY:rclone
\f[R]
.fi
.PP
\f[B]NB\f[R] the strings are not quoted for use in shells (eg bash,
powershell, windows cmd).
Most will work if enclosed in \[dq]double quotes\[dq], however
connection strings that contain double quotes will require further
quoting which is very shell dependent.
.IP
.nf
\f[C]
rclone config string <remote> [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for string
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone config touch
.PP
Ensure configuration file exists.
.IP
.nf
\f[C]
rclone config touch [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for touch
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone config unset
.PP
Unset options in an existing remote.
.SS Synopsis
.PP
Remove one or more options from an existing remote.
The options to remove should be passed in as a list of key names.
.PP
For example, to remove the \f[V]client_id\f[R] and
\f[V]client_secret\f[R] options from a remote of name myremote you would
do:
.IP
.nf
\f[C]
rclone config unset myremote client_id client_secret
\f[R]
.fi
.PP
This removes the keys from the config file entirely, which is different
from setting them to an empty string with \f[V]config update\f[R].
Removing a key restores rclone\[aq]s default behaviour for that option,
whereas setting it to an empty string overrides the default with an
empty value.
.PP
You can\[aq]t unset the \f[V]type\f[R] of a remote - use
\f[V]config delete\f[R] to remove the whole remote instead.
.IP
.nf
\f[C]
rclone config unset name [key]+ [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for unset
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone config update
.PP
Update options in an existing remote.
.SS Synopsis
.PP
Update an existing remote\[aq]s options.
The options should be passed in pairs of \f[V]key\f[R] \f[V]value\f[R]
or as \f[V]key=value\f[R].
.PP
For example, to update the env_auth field of a remote of name myremote
you would do:
.IP
.nf
\f[C]
rclone config update myremote env_auth true
rclone config update myremote env_auth=true
\f[R]
.fi
.PP
If the remote uses OAuth the token will be updated, if you don\[aq]t
require this add an extra parameter thus:
.IP
.nf
\f[C]
rclone config update myremote env_auth=true config_refresh_token=false
\f[R]
.fi
.PP
Note that if the config process would normally ask a question the
default is taken (unless \f[V]--non-interactive\f[R] is used).
Each time that happens rclone will print or DEBUG a message saying how
to affect the value taken.
.PP
If any of the parameters passed is a password field, then rclone will
automatically obscure them if they aren\[aq]t already obscured before
putting them in the config file.
.PP
\f[B]NB\f[R] If the password parameter is 22 characters or longer and
consists only of base64 characters then rclone can get confused about
whether the password is already obscured or not and put unobscured
passwords into the config file.
If you want to be 100% certain that the passwords get obscured then use
the \f[V]--obscure\f[R] flag, or if you are 100% certain you are already
passing obscured passwords then use \f[V]--no-obscure\f[R].
You can also set obscured passwords using the
\f[V]rclone config password\f[R] command.
.PP
The flag \f[V]--non-interactive\f[R] is for use by applications that
wish to configure rclone themselves, rather than using rclone\[aq]s text
based configuration questions.
If this flag is set, and rclone needs to ask the user a question, a JSON
blob will be returned with the question in it.
.PP
This will look something like (some irrelevant detail removed):
.IP
.nf
\f[C]
{
\[dq]State\[dq]: \[dq]*oauth-islocal,teamdrive,,\[dq],
\[dq]Option\[dq]: {
\[dq]Name\[dq]: \[dq]config_is_local\[dq],
\[dq]Help\[dq]: \[dq]Use web browser to automatically authenticate rclone with remote?\[rs]n * Say Y if the machine running rclone has a web browser you can use\[rs]n * Say N if running rclone on a (remote) machine without web browser access\[rs]nIf not sure try Y. If Y failed, try N.\[rs]n\[dq],
\[dq]Default\[dq]: true,
\[dq]Examples\[dq]: [
{
\[dq]Value\[dq]: \[dq]true\[dq],
\[dq]Help\[dq]: \[dq]Yes\[dq]
},
{
\[dq]Value\[dq]: \[dq]false\[dq],
\[dq]Help\[dq]: \[dq]No\[dq]
}
],
\[dq]Required\[dq]: false,
\[dq]IsPassword\[dq]: false,
\[dq]Type\[dq]: \[dq]bool\[dq],
\[dq]Exclusive\[dq]: true,
},
\[dq]Error\[dq]: \[dq]\[dq],
}
\f[R]
.fi
.PP
The format of \f[V]Option\f[R] is the same as returned by
\f[V]rclone config providers\f[R].
The question should be asked to the user and returned to rclone as the
\f[V]--result\f[R] option along with the \f[V]--state\f[R] parameter.
.PP
The keys of \f[V]Option\f[R] are used as follows:
.IP \[bu] 2
\f[V]Name\f[R] - name of variable - show to user
.IP \[bu] 2
\f[V]Help\f[R] - help text.
Hard wrapped at 80 chars.
Any URLs should be clicky.
.IP \[bu] 2
\f[V]Default\f[R] - default value - return this if the user just wants
the default.
.IP \[bu] 2
\f[V]Examples\f[R] - the user should be able to choose one of these
.IP \[bu] 2
\f[V]Required\f[R] - the value should be non-empty
.IP \[bu] 2
\f[V]IsPassword\f[R] - the value is a password and should be edited as
such
.IP \[bu] 2
\f[V]Type\f[R] - type of value, eg \f[V]bool\f[R], \f[V]string\f[R],
\f[V]int\f[R] and others
.IP \[bu] 2
\f[V]Exclusive\f[R] - if set no free-form entry allowed only the
\f[V]Examples\f[R]
.IP \[bu] 2
Irrelevant keys \f[V]Provider\f[R], \f[V]ShortOpt\f[R], \f[V]Hide\f[R],
\f[V]NoPrefix\f[R], \f[V]Advanced\f[R]
.PP
If \f[V]Error\f[R] is set then it should be shown to the user at the
same time as the question.
.IP
.nf
\f[C]
rclone config update name --continue --state \[dq]*oauth-islocal,teamdrive,,\[dq] --result \[dq]true\[dq]
\f[R]
.fi
.PP
Note that when using \f[V]--continue\f[R] all passwords should be passed
in the clear (not obscured).
Any default config values should be passed in with each invocation of
\f[V]--continue\f[R].
.PP
At the end of the non interactive process, rclone will return a result
with \f[V]State\f[R] as empty string.
.PP
If \f[V]--all\f[R] is passed then rclone will ask all the config
questions, not just the post config questions.
Any parameters are used as defaults for questions as usual.
.PP
Note that \f[V]bin/config.py\f[R] in the rclone source implements this
protocol as a readable demonstration.
.IP
.nf
\f[C]
rclone config update name [key value]+ [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--all Ask the full set of config questions
--continue Continue the configuration process with an answer
-h, --help help for update
--no-obscure Force any passwords not to be obscured
--no-output Don\[aq]t provide any output
--non-interactive Don\[aq]t interact with user and return questions
--obscure Force any passwords to be obscured
--result string Result - use with --continue
--state string State - use with --continue
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone config userinfo
.PP
Prints info about logged in user of remote.
.SS Synopsis
.PP
This prints the details of the person logged in to the cloud storage
system.
.IP
.nf
\f[C]
rclone config userinfo remote: [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for userinfo
--json Format output as JSON
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone config (https://rclone.org/commands/rclone_config/) - Enter an
interactive configuration session.
.SH rclone convmv
.PP
Convert file and directory names in place.
.SS Synopsis
.PP
convmv supports advanced path name transformations for converting and
renaming files and directories by applying prefixes, suffixes, and other
alterations.
.PP
.TS
tab(@);
lw(35.0n) lw(35.0n).
T{
Command
T}@T{
Description
T}
_
T{
\f[V]--name-transform prefix=XXXX\f[R]
T}@T{
Prepends XXXX to the file name.
T}
T{
\f[V]--name-transform suffix=XXXX\f[R]
T}@T{
Appends XXXX to the file name after the extension.
T}
T{
\f[V]--name-transform suffix_keep_extension=XXXX\f[R]
T}@T{
Appends XXXX to the file name while preserving the original file
extension.
T}
T{
\f[V]--name-transform trimprefix=XXXX\f[R]
T}@T{
Removes XXXX if it appears at the start of the file name.
T}
T{
\f[V]--name-transform trimsuffix=XXXX\f[R]
T}@T{
Removes XXXX if it appears at the end of the file name.
T}
T{
\f[V]--name-transform regex=pattern/replacement\f[R]
T}@T{
Applies a regex-based transformation.
T}
T{
\f[V]--name-transform replace=old:new\f[R]
T}@T{
Replaces occurrences of old with new in the file name.
T}
T{
\f[V]--name-transform date={YYYYMMDD}\f[R]
T}@T{
Appends or prefixes the specified date format.
T}
T{
\f[V]--name-transform truncate=N\f[R]
T}@T{
Truncates the file name to a maximum of N characters.
T}
T{
\f[V]--name-transform truncate_keep_extension=N\f[R]
T}@T{
Truncates the file name to a maximum of N characters while preserving
the original file extension.
T}
T{
\f[V]--name-transform truncate_bytes=N\f[R]
T}@T{
Truncates the file name to a maximum of N bytes (not characters).
T}
T{
\f[V]--name-transform truncate_bytes_keep_extension=N\f[R]
T}@T{
Truncates the file name to a maximum of N bytes (not characters) while
preserving the original file extension.
T}
T{
\f[V]--name-transform base64encode\f[R]
T}@T{
Encodes the file name in Base64.
T}
T{
\f[V]--name-transform base64decode\f[R]
T}@T{
Decodes a Base64-encoded file name.
T}
T{
\f[V]--name-transform encoder=ENCODING\f[R]
T}@T{
Converts the file name to the specified encoding (e.g., ISO-8859-1,
Windows-1252, Macintosh).
T}
T{
\f[V]--name-transform decoder=ENCODING\f[R]
T}@T{
Decodes the file name from the specified encoding.
T}
T{
\f[V]--name-transform charmap=MAP\f[R]
T}@T{
Applies a character mapping transformation.
T}
T{
\f[V]--name-transform lowercase\f[R]
T}@T{
Converts the file name to lowercase.
T}
T{
\f[V]--name-transform uppercase\f[R]
T}@T{
Converts the file name to UPPERCASE.
T}
T{
\f[V]--name-transform titlecase\f[R]
T}@T{
Converts the file name to Title Case.
T}
T{
\f[V]--name-transform ascii\f[R]
T}@T{
Strips non-ASCII characters.
T}
T{
\f[V]--name-transform url\f[R]
T}@T{
URL-encodes the file name.
T}
T{
\f[V]--name-transform nfc\f[R]
T}@T{
Converts the file name to NFC Unicode normalization form.
T}
T{
\f[V]--name-transform nfd\f[R]
T}@T{
Converts the file name to NFD Unicode normalization form.
T}
T{
\f[V]--name-transform nfkc\f[R]
T}@T{
Converts the file name to NFKC Unicode normalization form.
T}
T{
\f[V]--name-transform nfkd\f[R]
T}@T{
Converts the file name to NFKD Unicode normalization form.
T}
T{
\f[V]--name-transform command=/path/to/my/programfile names.\f[R]
T}@T{
Executes an external program to transform.
T}
.TE
.PP
Conversion modes:
.IP
.nf
\f[C]
none
nfc
nfd
nfkc
nfkd
replace
prefix
suffix
suffix_keep_extension
trimprefix
trimsuffix
index
date
truncate
truncate_keep_extension
truncate_bytes
truncate_bytes_keep_extension
base64encode
base64decode
encoder
decoder
ISO-8859-1
Windows-1252
Macintosh
charmap
lowercase
uppercase
titlecase
ascii
url
regex
command
\f[R]
.fi
.PP
Char maps:
.IP
.nf
\f[C]
IBM-Code-Page-037
IBM-Code-Page-437
IBM-Code-Page-850
IBM-Code-Page-852
IBM-Code-Page-855
Windows-Code-Page-858
IBM-Code-Page-860
IBM-Code-Page-862
IBM-Code-Page-863
IBM-Code-Page-865
IBM-Code-Page-866
IBM-Code-Page-1047
IBM-Code-Page-1140
ISO-8859-1
ISO-8859-2
ISO-8859-3
ISO-8859-4
ISO-8859-5
ISO-8859-6
ISO-8859-7
ISO-8859-8
ISO-8859-9
ISO-8859-10
ISO-8859-13
ISO-8859-14
ISO-8859-15
ISO-8859-16
KOI8-R
KOI8-U
Macintosh
Macintosh-Cyrillic
Windows-874
Windows-1250
Windows-1251
Windows-1252
Windows-1253
Windows-1254
Windows-1255
Windows-1256
Windows-1257
Windows-1258
X-User-Defined
\f[R]
.fi
.PP
Encoding masks:
.IP
.nf
\f[C]
Asterisk
BackQuote
BackSlash
Colon
CrLf
Ctl
Del
Dollar
Dot
DoubleQuote
Exclamation
Hash
InvalidUtf8
LeftCrLfHtVt
LeftPeriod
LeftSpace
LeftTilde
LtGt
None
Percent
Pipe
Question
Raw
RightCrLfHtVt
RightPeriod
RightSpace
Semicolon
SingleQuote
Slash
SquareBracket
\f[R]
.fi
.PP
Examples:
.IP
.nf
\f[C]
rclone convmv \[dq]stories/The Quick Brown Fox!.txt\[dq] --name-transform \[dq]all,uppercase\[dq]
// Output: STORIES/THE QUICK BROWN FOX!.TXT
\f[R]
.fi
.IP
.nf
\f[C]
rclone convmv \[dq]stories/The Quick Brown Fox!.txt\[dq] --name-transform \[dq]all,replace=Fox:Turtle\[dq] --name-transform \[dq]all,replace=Quick:Slow\[dq]
// Output: stories/The Slow Brown Turtle!.txt
\f[R]
.fi
.IP
.nf
\f[C]
rclone convmv \[dq]stories/The Quick Brown Fox!.txt\[dq] --name-transform \[dq]all,base64encode\[dq]
// Output: c3Rvcmllcw==/VGhlIFF1aWNrIEJyb3duIEZveCEudHh0
\f[R]
.fi
.IP
.nf
\f[C]
rclone convmv \[dq]c3Rvcmllcw==/VGhlIFF1aWNrIEJyb3duIEZveCEudHh0\[dq] --name-transform \[dq]all,base64decode\[dq]
// Output: stories/The Quick Brown Fox!.txt
\f[R]
.fi
.IP
.nf
\f[C]
rclone convmv \[dq]stories/The Quick Brown 🦊 Fox Went to the Café!.txt\[dq] --name-transform \[dq]all,nfc\[dq]
// Output: stories/The Quick Brown 🦊 Fox Went to the Café!.txt
\f[R]
.fi
.IP
.nf
\f[C]
rclone convmv \[dq]stories/The Quick Brown 🦊 Fox Went to the Café!.txt\[dq] --name-transform \[dq]all,nfd\[dq]
// Output: stories/The Quick Brown 🦊 Fox Went to the Café!.txt
\f[R]
.fi
.IP
.nf
\f[C]
rclone convmv \[dq]stories/The Quick Brown 🦊 Fox!.txt\[dq] --name-transform \[dq]all,ascii\[dq]
// Output: stories/The Quick Brown Fox!.txt
\f[R]
.fi
.IP
.nf
\f[C]
rclone convmv \[dq]stories/The Quick Brown Fox!.txt\[dq] --name-transform \[dq]all,trimsuffix=.txt\[dq]
// Output: stories/The Quick Brown Fox!
\f[R]
.fi
.IP
.nf
\f[C]
rclone convmv \[dq]stories/The Quick Brown Fox!.txt\[dq] --name-transform \[dq]all,prefix=OLD_\[dq]
// Output: OLD_stories/OLD_The Quick Brown Fox!.txt
\f[R]
.fi
.IP
.nf
\f[C]
rclone convmv \[dq]stories/The Quick Brown 🦊 Fox Went to the Café!.txt\[dq] --name-transform \[dq]all,charmap=ISO-8859-7\[dq]
// Output: stories/The Quick Brown _ Fox Went to the Caf_!.txt
\f[R]
.fi
.IP
.nf
\f[C]
rclone convmv \[dq]stories/The Quick Brown Fox: A Memoir [draft].txt\[dq] --name-transform \[dq]all,encoder=Colon,SquareBracket\[dq]
// Output: stories/The Quick Brown Fox: A Memoir [draft].txt
\f[R]
.fi
.IP
.nf
\f[C]
rclone convmv \[dq]stories/The Quick Brown 🦊 Fox Went to the Café!.txt\[dq] --name-transform \[dq]all,truncate=21\[dq]
// Output: stories/The Quick Brown 🦊 Fox
\f[R]
.fi
.IP
.nf
\f[C]
rclone convmv \[dq]stories/The Quick Brown Fox!.txt\[dq] --name-transform \[dq]all,command=echo\[dq]
// Output: stories/The Quick Brown Fox!.txt
\f[R]
.fi
.IP
.nf
\f[C]
rclone convmv \[dq]stories/The Quick Brown Fox!\[dq] --name-transform \[dq]date=-{YYYYMMDD}\[dq]
// Output: stories/The Quick Brown Fox!-20261106
\f[R]
.fi
.IP
.nf
\f[C]
rclone convmv \[dq]stories/The Quick Brown Fox!\[dq] --name-transform \[dq]date=-{macfriendlytime}\[dq]
// Output: stories/The Quick Brown Fox!-2026-11-06 0220PM
\f[R]
.fi
.IP
.nf
\f[C]
rclone convmv \[dq]stories/The Quick Brown Fox!.txt\[dq] --name-transform \[dq]all,regex=[\[rs]\[rs].\[rs]\[rs]w]/ab\[dq]
// Output: ababababababab/ababab ababababab ababababab ababab!abababab
\f[R]
.fi
.PP
The regex command generally accepts Perl-style regular expressions, the
exact syntax is defined in the Go regular expression
reference (https://golang.org/pkg/regexp/syntax/).
The replacement string may contain capturing group variables,
referencing capturing groups using the syntax \f[V]$name\f[R] or
\f[V]${name}\f[R], where the name can refer to a named capturing group
or it can simply be the index as a number.
To insert a literal $, use $$.
.PP
Multiple transformations can be used in sequence, applied in the order
they are specified on the command line.
.PP
The \f[V]--name-transform\f[R] flag is also available in \f[V]sync\f[R],
\f[V]copy\f[R], and \f[V]move\f[R].
.SS Files vs Directories
.PP
By default \f[V]--name-transform\f[R] will only apply to file names.
The means only the leaf file name will be transformed.
However some of the transforms would be better applied to the whole path
or just directories.
To choose which which part of the file path is affected some tags can be
added to the \f[V]--name-transform\f[R].
.PP
.TS
tab(@);
lw(35.0n) lw(35.0n).
T{
Tag
T}@T{
Effect
T}
_
T{
\f[V]file\f[R]
T}@T{
Only transform the leaf name of files (DEFAULT)
T}
T{
\f[V]dir\f[R]
T}@T{
Only transform name of directories - these may appear anywhere in the
path
T}
T{
\f[V]all\f[R]
T}@T{
Transform the entire path for files and directories
T}
.TE
.PP
This is used by adding the tag into the transform name like this:
\f[V]--name-transform file,prefix=ABC\f[R] or
\f[V]--name-transform dir,prefix=DEF\f[R].
.PP
For some conversions using all is more likely to be useful, for example
\f[V]--name-transform all,nfc\f[R].
.PP
Note that \f[V]--name-transform\f[R] may not add path separators
\f[V]/\f[R] to the name.
This will cause an error.
.SS Ordering and Conflicts
.IP \[bu] 2
Transformations will be applied in the order specified by the user.
.RS 2
.IP \[bu] 2
If the \f[V]file\f[R] tag is in use (the default) then only the leaf
name of files will be transformed.
.IP \[bu] 2
If the \f[V]dir\f[R] tag is in use then directories anywhere in the path
will be transformed
.IP \[bu] 2
If the \f[V]all\f[R] tag is in use then directories and files anywhere
in the path will be transformed
.IP \[bu] 2
Each transformation will be run one path segment at a time.
.IP \[bu] 2
If a transformation adds a \f[V]/\f[R] or ends up with an empty path
segment then that will be an error.
.RE
.IP \[bu] 2
It is up to the user to put the transformations in a sensible order.
.RS 2
.IP \[bu] 2
Conflicting transformations, such as \f[V]prefix\f[R] followed by
\f[V]trimprefix\f[R] or \f[V]nfc\f[R] followed by \f[V]nfd\f[R], are
possible.
.IP \[bu] 2
Instead of enforcing mutual exclusivity, transformations are applied in
sequence as specified by the user, allowing for intentional use cases
(e.g., trimming one prefix before adding another).
.IP \[bu] 2
Users should be aware that certain combinations may lead to unexpected
results and should verify transformations using \f[V]--dry-run\f[R]
before execution.
.RE
.SS Race Conditions and Non-Deterministic Behavior
.PP
Some transformations, such as \f[V]replace=old:new\f[R], may introduce
conflicts where multiple source files map to the same destination name.
This can lead to race conditions when performing concurrent transfers.
It is up to the user to anticipate these.
.IP \[bu] 2
If two files from the source are transformed into the same name at the
destination, the final state may be non-deterministic.
.IP \[bu] 2
Running rclone check after a sync using such transformations may
erroneously report missing or differing files due to overwritten
results.
.PP
To minimize risks, users should:
.IP \[bu] 2
Carefully review transformations that may introduce conflicts.
.IP \[bu] 2
Use \f[V]--dry-run\f[R] to inspect changes before executing a sync (but
keep in mind that it won\[aq]t show the effect of non-deterministic
transformations).
.IP \[bu] 2
Avoid transformations that cause multiple distinct source files to map
to the same destination name.
.IP \[bu] 2
Consider disabling concurrency with \f[V]--transfers=1\f[R] if
necessary.
.IP \[bu] 2
Certain transformations (e.g.
\f[V]prefix\f[R]) will have a multiplying effect every time they are
used.
Avoid these when using \f[V]bisync\f[R].
.IP
.nf
\f[C]
rclone convmv dest:path --name-transform XXX [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--create-empty-src-dirs Create empty source dirs on destination after move
--delete-empty-src-dirs Delete empty source dirs after move
-h, --help help for convmv
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Copy Options
.PP
Flags for anything which can copy a file
.IP
.nf
\f[C]
--check-first Do all the checks before starting transfers
-c, --checksum Check for changes with size & checksum (if available, or fallback to size only)
--compare-dest stringArray Include additional server-side paths during comparison
--copy-dest stringArray Implies --compare-dest but also copies files from paths into destination
--cutoff-mode HARD|SOFT|CAUTIOUS Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
--ignore-case-sync Ignore case when synchronizing
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
-I, --ignore-times Don\[aq]t skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
-l, --links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
--max-duration Duration Maximum duration rclone will transfer data for (default 0s)
--max-transfer SizeSuffix Maximum size of data to transfer (default off)
-M, --metadata If set, preserve metadata when copying objects
--modify-window Duration Max time diff to be considered the same (default 1ns)
--multi-thread-chunk-size SizeSuffix Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
--multi-thread-cutoff SizeSuffix Use multi-thread downloads for files above this size (default 256Mi)
--multi-thread-streams int Number of streams to use for multi-thread downloads (default 4)
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--name-transform stringArray Transform paths during the copy process
--no-check-dest Don\[aq]t check the destination, copy regardless
--no-traverse Don\[aq]t traverse destination file system on copy
--no-update-dir-modtime Don\[aq]t update directory modification times
--no-update-modtime Don\[aq]t update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. \[aq]size,descending\[aq]
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default \[dq].partial\[dq])
--refresh-times Refresh the modtime of remote files
--server-side-across-configs Allow server-side operations (e.g. copy) to work across different configs
--size-only Skip based on size only, not modtime or checksum
--streaming-upload-cutoff SizeSuffix Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
-u, --update Skip files that are newer on the destination
\f[R]
.fi
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone copyto
.PP
Copy files from source to dest, skipping identical files.
.SS Synopsis
.PP
If source:path is a file or directory then it copies it to a file or
directory named dest:path.
.PP
This can be used to copy a single file to a destination with a name
different from its source - for example, uploading and renaming in one
step.
If the source is a directory then it acts exactly like the
copy (https://rclone.org/commands/rclone_copy/) command.
.PP
So
.IP
.nf
\f[C]
rclone copyto src dst
\f[R]
.fi
.PP
where src and dst are rclone paths, either \f[V]remote:path\f[R] or
\f[V]/path/to/local\f[R] or
\f[V]C:\[rs]windows\[rs]path\[rs]if\[rs]on\[rs]windows\f[R].
.PP
This will:
.IP
.nf
\f[C]
if src is file
copy it to dst, overwriting an existing file if it exists
if src is directory
copy it to dst, overwriting existing files if they exist
see copy command for full details
\f[R]
.fi
.PP
This doesn\[aq]t transfer files that are identical on src and dst,
testing by size and modification time or MD5SUM.
It doesn\[aq]t delete files from the destination.
.PP
\f[I]If you are looking to copy just a byte range of a file, please see
\f[VI]rclone cat --offset X --count Y\f[I].\f[R]
.PP
\f[B]Note\f[R]: Use the \f[V]-P\f[R]/\f[V]--progress\f[R] flag to view
real-time transfer statistics.
.SS Logger Flags
.PP
The \f[V]--differ\f[R], \f[V]--missing-on-dst\f[R],
\f[V]--missing-on-src\f[R], \f[V]--match\f[R] and \f[V]--error\f[R]
flags write paths, one per line, to the file name (or stdout if it is
\f[V]-\f[R]) supplied.
What they write is described in the help below.
For example \f[V]--differ\f[R] will write all paths which are present on
both the source and destination but different.
.PP
The \f[V]--combined\f[R] flag will write a file (or stdout) which
contains all file paths with a symbol and then a space and then the path
to tell you what happened to it.
These are reminiscent of diff files.
.IP \[bu] 2
\f[V]= path\f[R] means path was found in source and destination and was
identical
.IP \[bu] 2
\f[V]- path\f[R] means path was missing on the source, so only in the
destination
.IP \[bu] 2
\f[V]+ path\f[R] means path was missing on the destination, so only in
the source
.IP \[bu] 2
\f[V]* path\f[R] means path was present in source and destination but
different.
.IP \[bu] 2
\f[V]! path\f[R] means there was an error reading or hashing the source
or dest.
.PP
The \f[V]--dest-after\f[R] flag writes a list file using the same format
flags as
\f[V]lsf\f[R] (https://rclone.org/commands/rclone_lsf/#synopsis)
(including customizable options for hash, modtime,
etc. (https://rclone.org/commands/rclone_lsf/#synopsis)) Conceptually it
is similar to rsync\[aq]s \f[V]--itemize-changes\f[R], but not identical
-- it should output an accurate list of what will be on the destination
after the command is finished.
.PP
When the \f[V]--no-traverse\f[R] flag is set, all logs involving files
that exist only on the destination will be incomplete or completely
missing.
.PP
Note that these logger flags have a few limitations, and certain
scenarios are not currently supported:
.IP \[bu] 2
\f[V]--max-duration\f[R] / \f[V]CutoffModeHard\f[R]
.IP \[bu] 2
\f[V]--compare-dest\f[R] / \f[V]--copy-dest\f[R]
.IP \[bu] 2
server-side moves of an entire dir at once
.IP \[bu] 2
High-level retries, because there would be duplicates (use
\f[V]--retries 1\f[R] to disable)
.IP \[bu] 2
Possibly some unusual error scenarios
.PP
Note also that each file is logged during execution, as opposed to
after, so it is most useful as a predictor of what SHOULD happen to each
file (which may or may not match what actually DID).
.IP
.nf
\f[C]
rclone copyto source:path dest:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--absolute Put a leading / in front of path names
--combined string Make a combined report of changes to this file
--csv Output in CSV format
--dest-after string Report all files that exist on the dest post-sync
--differ string Report all non-matching files to this file
-d, --dir-slash Append a slash to directory names (default true)
--dirs-only Only list directories
--error string Report all files with errors (hashing or reading) to this file
--files-only Only list files (default true)
-F, --format string Output format - see lsf help for details (default \[dq]p\[dq])
--hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default \[dq]md5\[dq])
-h, --help help for copyto
--match string Report all matching files to this file
--missing-on-dst string Report all files missing from the destination to this file
--missing-on-src string Report all files missing from the source to this file
-s, --separator string Separator for the items in the format (default \[dq];\[dq])
-t, --timeformat string Specify a custom time format - see docs for details (default: 2006-01-02 15:04:05)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Copy Options
.PP
Flags for anything which can copy a file
.IP
.nf
\f[C]
--check-first Do all the checks before starting transfers
-c, --checksum Check for changes with size & checksum (if available, or fallback to size only)
--compare-dest stringArray Include additional server-side paths during comparison
--copy-dest stringArray Implies --compare-dest but also copies files from paths into destination
--cutoff-mode HARD|SOFT|CAUTIOUS Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
--ignore-case-sync Ignore case when synchronizing
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
-I, --ignore-times Don\[aq]t skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
-l, --links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
--max-duration Duration Maximum duration rclone will transfer data for (default 0s)
--max-transfer SizeSuffix Maximum size of data to transfer (default off)
-M, --metadata If set, preserve metadata when copying objects
--modify-window Duration Max time diff to be considered the same (default 1ns)
--multi-thread-chunk-size SizeSuffix Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
--multi-thread-cutoff SizeSuffix Use multi-thread downloads for files above this size (default 256Mi)
--multi-thread-streams int Number of streams to use for multi-thread downloads (default 4)
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--name-transform stringArray Transform paths during the copy process
--no-check-dest Don\[aq]t check the destination, copy regardless
--no-traverse Don\[aq]t traverse destination file system on copy
--no-update-dir-modtime Don\[aq]t update directory modification times
--no-update-modtime Don\[aq]t update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. \[aq]size,descending\[aq]
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default \[dq].partial\[dq])
--refresh-times Refresh the modtime of remote files
--server-side-across-configs Allow server-side operations (e.g. copy) to work across different configs
--size-only Skip based on size only, not modtime or checksum
--streaming-upload-cutoff SizeSuffix Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
-u, --update Skip files that are newer on the destination
\f[R]
.fi
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone copyurl
.PP
Copy the contents of the URL supplied content to dest:path.
.SS Synopsis
.PP
Download a URL\[aq]s content and copy it to the destination without
saving it in temporary storage.
.PP
Setting \f[V]--auto-filename\f[R] will attempt to automatically
determine the filename from the URL (after any redirections) and used in
the destination path.
.PP
With \f[V]--header-filename\f[R] in addition, if a specific filename is
set in HTTP headers, it will be used instead of the name from the URL.
With \f[V]--print-filename\f[R] in addition, the resulting file name
will be printed.
.PP
Setting \f[V]--no-clobber\f[R] will prevent overwriting file on the
destination if there is one with the same name.
.PP
Setting \f[V]--stdout\f[R] or making the output file name \f[V]-\f[R]
will cause the output to be written to standard output.
.PP
Setting \f[V]--urls\f[R] allows you to input a CSV file of URLs in
format: URL, FILENAME.
If \f[V]--urls\f[R] is in use then replace the URL in the arguments with
the file containing the URLs, e.g.:
.IP
.nf
\f[C]
rclone copyurl --urls myurls.csv remote:dir
\f[R]
.fi
.PP
Missing filenames will be autogenerated equivalent to using
\f[V]--auto-filename\f[R].
Note that \f[V]--stdout\f[R] and \f[V]--print-filename\f[R] are
incompatible with \f[V]--urls\f[R].
This will do \f[V]--transfers\f[R] copies in parallel.
Note that if \f[V]--auto-filename\f[R] is desired for all URLs then a
file with only URLs and no filename can be used.
.PP
Each FILENAME in the CSV file can start with a relative path which will
be appended to the destination path provided at the command line.
For example, running the command shown above with the following CSV file
will write two files to the destination:
\f[V]remote:dir/local/path/bar.json\f[R] and
\f[V]remote:dir/another/local/directory/qux.json\f[R]
.IP
.nf
\f[C]
https://example.org/foo/bar.json,local/path/bar.json
https://example.org/qux/baz.json,another/local/directory/qux.json
\f[R]
.fi
.SS Troubleshooting
.PP
If you can\[aq]t get \f[V]rclone copyurl\f[R] to work then here are some
things you can try:
.IP \[bu] 2
\f[V]--disable-http2\f[R] rclone will use HTTP2 if available - try
disabling it
.IP \[bu] 2
\f[V]--bind 0.0.0.0\f[R] rclone will use IPv6 if available - try
disabling it
.IP \[bu] 2
\f[V]--bind ::0\f[R] to disable IPv4
.IP \[bu] 2
\f[V]--user agent curl\f[R] - some sites have whitelists for curl\[aq]s
user-agent - try that
.IP \[bu] 2
Make sure the site works with \f[V]curl\f[R] directly
.IP
.nf
\f[C]
rclone copyurl https://example.com dest:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-a, --auto-filename Get the file name from the URL and use it for destination file path
--header-filename Get the file name from the Content-Disposition header
-h, --help help for copyurl
--no-clobber Prevent overwriting file with same name
-p, --print-filename Print the resulting name from --auto-filename
--stdout Write the output to stdout rather than a file
--urls Use a CSV file of links to process multiple URLs
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone cryptcheck
.PP
Cryptcheck checks the integrity of an encrypted remote.
.SS Synopsis
.PP
Checks a remote against an encrypted (https://rclone.org/crypt/) remote.
This is the equivalent of running rclone
check (https://rclone.org/commands/rclone_check/), but able to check the
checksums of the encrypted remote.
.PP
For it to work the underlying remote of the cryptedremote must support
some kind of checksum.
.PP
It works by reading the nonce from each file on the cryptedremote: and
using that to encrypt each file on the remote:.
It then checks the checksum of the underlying file on the cryptedremote:
against the checksum of the file it has just encrypted.
.PP
Use it like this
.IP
.nf
\f[C]
rclone cryptcheck /path/to/files encryptedremote:path
\f[R]
.fi
.PP
You can use it like this also, but that will involve downloading all the
files in \f[V]remote:path\f[R].
.IP
.nf
\f[C]
rclone cryptcheck remote:path encryptedremote:path
\f[R]
.fi
.PP
After it has run it will log the status of the
\f[V]encryptedremote:\f[R].
.PP
If you supply the \f[V]--one-way\f[R] flag, it will only check that
files in the source match the files in the destination, not the other
way around.
This means that extra files in the destination that are not in the
source will not be detected.
.PP
The \f[V]--differ\f[R], \f[V]--missing-on-dst\f[R],
\f[V]--missing-on-src\f[R], \f[V]--match\f[R] and \f[V]--error\f[R]
flags write paths, one per line, to the file name (or stdout if it is
\f[V]-\f[R]) supplied.
What they write is described in the help below.
For example \f[V]--differ\f[R] will write all paths which are present on
both the source and destination but different.
.PP
The \f[V]--combined\f[R] flag will write a file (or stdout) which
contains all file paths with a symbol and then a space and then the path
to tell you what happened to it.
These are reminiscent of diff files.
.IP \[bu] 2
\f[V]= path\f[R] means path was found in source and destination and was
identical
.IP \[bu] 2
\f[V]- path\f[R] means path was missing on the source, so only in the
destination
.IP \[bu] 2
\f[V]+ path\f[R] means path was missing on the destination, so only in
the source
.IP \[bu] 2
\f[V]* path\f[R] means path was present in source and destination but
different.
.IP \[bu] 2
\f[V]! path\f[R] means there was an error reading or hashing the source
or dest.
.PP
The default number of parallel checks is 8.
See the --checkers (https://rclone.org/docs/#checkers-int) option for
more information.
.IP
.nf
\f[C]
rclone cryptcheck remote:path cryptedremote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--combined string Make a combined report of changes to this file
--differ string Report all non-matching files to this file
--error string Report all files with errors (hashing or reading) to this file
-h, --help help for cryptcheck
--match string Report all matching files to this file
--missing-on-dst string Report all files missing from the destination to this file
--missing-on-src string Report all files missing from the source to this file
--one-way Check one way only, source files must exist on remote
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Check Options
.PP
Flags used for check commands
.IP
.nf
\f[C]
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
\f[R]
.fi
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone cryptdecode
.PP
Cryptdecode returns unencrypted file names.
.SS Synopsis
.PP
Returns unencrypted file names when provided with a list of encrypted
file names.
List limit is 10 items.
.PP
If you supply the \f[V]--reverse\f[R] flag, it will return encrypted
file names.
.PP
use it like this
.IP
.nf
\f[C]
rclone cryptdecode encryptedremote: encryptedfilename1 encryptedfilename2
rclone cryptdecode --reverse encryptedremote: filename1 filename2
\f[R]
.fi
.PP
Another way to accomplish this is by using the
\f[V]rclone backend encode\f[R] (or \f[V]decode\f[R]) command.
See the documentation on the crypt (https://rclone.org/crypt/) overlay
for more info.
.IP
.nf
\f[C]
rclone cryptdecode encryptedremote: encryptedfilename [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for cryptdecode
--reverse Reverse cryptdecode, encrypts filenames
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone deletefile
.PP
Remove a single file from remote.
.SS Synopsis
.PP
Remove a single file from remote.
Unlike \f[V]delete\f[R] it cannot be used to remove a directory and it
doesn\[aq]t obey include/exclude filters - if the specified file exists,
it will always be removed from its original location.
.PP
The \f[V]--backup-dir\f[R] and \f[V]--suffix\f[R] flags are honored when
set.
.IP
.nf
\f[C]
rclone deletefile remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for deletefile
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Sync Options
.PP
Flags used for sync commands
.IP
.nf
\f[C]
--backup-dir string Make backups into hierarchy based in DIR
--delete-after When synchronizing, delete files on destination after transferring (default)
--delete-before When synchronizing, delete files on destination before transferring
--delete-during When synchronizing, delete files during transfer
--fix-case Force rename of case insensitive dest to match source
--ignore-errors Delete even if there are I/O errors
--list-cutoff int To save memory, sort directory listings on disk above this threshold (default 1000000)
--max-delete int When synchronizing, limit the number of deletes (default -1)
--max-delete-size SizeSuffix When synchronizing, limit the total size of deletes (default off)
--suffix string Suffix to add to changed files
--suffix-keep-extension Preserve the extension when using --suffix
--track-renames When synchronizing, track file renames and do a server-side move if possible
--track-renames-strategy string Strategies to use when synchronizing using track-renames hash|modtime|leaf (default \[dq]hash\[dq])
\f[R]
.fi
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone gendocs
.PP
Output markdown docs for rclone to the directory supplied.
.SS Synopsis
.PP
This produces markdown docs for the rclone commands to the directory
supplied.
These are in a format suitable for hugo to render into the rclone.org
website.
.IP
.nf
\f[C]
rclone gendocs output_directory [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for gendocs
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone gitannex
.PP
Speaks with git-annex over stdin/stdout.
.SS Synopsis
.PP
Rclone\[aq]s \f[V]gitannex\f[R] subcommand enables
git-annex (https://git-annex.branchable.com/) to store and retrieve
content from an rclone remote.
It is meant to be run by git-annex, not directly by users.
.SS Installation on Linux
.IP "1." 3
Skip this step if your version of git-annex is
10.20240430 (https://git-annex.branchable.com/news/version_10.20240430/)
or newer.
Otherwise, you must create a symlink somewhere on your PATH with a
particular name.
This symlink helps git-annex tell rclone it wants to run the
\[dq]gitannex\[dq] subcommand.
.RS 4
.PP
Create the helper symlink in \[dq]$HOME/bin\[dq]:
.IP
.nf
\f[C]
ln -s \[dq]$(realpath rclone)\[dq] \[dq]$HOME/bin/git-annex-remote-rclone-builtin\[dq]
Verify the new symlink is on your PATH:
\[ga]\[ga]\[ga]console
which git-annex-remote-rclone-builtin
\f[R]
.fi
.RE
.IP "2." 3
Add a new remote to your git-annex repo.
This new remote will connect git-annex with the
\f[V]rclone gitannex\f[R] subcommand.
.RS 4
.PP
Start by asking git-annex to describe the remote\[aq]s available
configuration parameters.
.PP
If you skipped step 1:
.IP
.nf
\f[C]
git annex initremote MyRemote type=rclone --whatelse
\f[R]
.fi
.PP
If you created a symlink in step 1:
.IP
.nf
\f[C]
git annex initremote MyRemote type=external externaltype=rclone-builtin --whatelse
\f[R]
.fi
.RS
.PP
\f[B]NOTE\f[R]: If you\[aq]re porting an existing
git-annex-remote-rclone (https://github.com/git-annex-remote-rclone/git-annex-remote-rclone)
remote to use \f[V]rclone gitannex\f[R], you can probably reuse the
configuration parameters verbatim without renaming them.
Check parameter synonyms with \f[V]--whatelse\f[R] as shown above.
.RE
.PP
The following example creates a new git-annex remote named
\[dq]MyRemote\[dq] that will use the rclone remote named
\[dq]SomeRcloneRemote\[dq].
That rclone remote must be one configured in your rclone.conf file,
which can be located with \f[V]rclone config file\f[R].
.IP
.nf
\f[C]
git annex initremote MyRemote \[rs]
type=external \[rs]
externaltype=rclone-builtin \[rs]
encryption=none \[rs]
rcloneremotename=SomeRcloneRemote \[rs]
rcloneprefix=git-annex-content \[rs]
rclonelayout=nodir
\f[R]
.fi
.RE
.IP "3." 3
Before you trust this command with your precious data, be sure to
\f[B]test the remote\f[R].
This command is very new and has not been tested on many rclone
backends.
Caveat emptor!
.RS 4
.IP
.nf
\f[C]
git annex testremote MyRemote
\f[R]
.fi
.RE
.PP
Happy annexing!
.IP
.nf
\f[C]
rclone gitannex [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for gitannex
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone gui
.PP
Open the web based GUI.
.SS Synopsis
.PP
This command starts an embedded web GUI for rclone and opens it in your
default browser.
.PP
This starts an RC API server and a GUI server on separate localhost
ports, generates login credentials automatically unless --no-auth is
specified, and opens the browser already authenticated.
.IP
.nf
\f[C]
rclone gui
\f[R]
.fi
.PP
By default rclone gui serves the web GUI that was embedded into the
rclone binary at build time from https://github.com/rclone/rclone-web/
You can override this by passing a path to either an unpacked GUI
directory or a dist.zip archive (e.g.
one downloaded from the rclone-web releases page):
.IP
.nf
\f[C]
rclone gui ./my-dist/
rclone gui ./dist.zip
\f[R]
.fi
.PP
This is useful for iterating on the GUI locally without rebuilding
rclone, or for serving a different GUI release than the one embedded.
.PP
Use --no-open-browser to skip opening the browser automatically:
.IP
.nf
\f[C]
rclone gui --no-open-browser
\f[R]
.fi
.PP
Use --addr to bind the GUI to a specific address:
.IP
.nf
\f[C]
rclone gui --addr localhost:5580
\f[R]
.fi
.PP
Use --user and --pass to set specific credentials:
.IP
.nf
\f[C]
rclone gui --user admin --pass secret
\f[R]
.fi
.PP
Use --no-auth to disable authentication entirely:
.IP
.nf
\f[C]
rclone gui --no-auth
\f[R]
.fi
.PP
For more help see the GUI docs (https://rclone.org/gui/).
.IP
.nf
\f[C]
rclone gui [path] [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--addr stringArray IPaddress:Port for the GUI server (default auto-chosen localhost port)
--api-addr stringArray IPaddress:Port for the RC API server (default auto-chosen localhost port)
--enable-metrics Enable OpenMetrics/Prometheus compatible endpoint at /metrics
-h, --help help for gui
--no-auth Don\[aq]t require auth for the RC API
--no-open-browser Skip opening the browser automatically
--pass string Password for RC authentication
--user string User name for RC authentication
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS RC Options
.PP
Flags to control the Remote Control API
.IP
.nf
\f[C]
--rc Enable the remote control server
--rc-addr stringArray IPaddress:Port or :Port to bind server to (default localhost:5572)
--rc-allow-origin string Origin which cross-domain request (CORS) can be executed from
--rc-baseurl string Prefix for URLs - leave blank for root
--rc-cert string TLS PEM key (concatenation of certificate and CA certificate)
--rc-client-ca string Client certificate authority to verify clients with
--rc-enable-metrics Enable the Prometheus metrics path at the remote control server
--rc-files string Path to local files to serve on the HTTP server
--rc-htpasswd string A htpasswd file - if not provided no authentication is done
--rc-job-expire-duration Duration Expire finished async jobs older than this value (default 1m0s)
--rc-job-expire-interval Duration Interval to check for expired async jobs (default 10s)
--rc-key string TLS PEM Private key
--rc-max-header-bytes int Maximum size of request header (default 4096)
--rc-min-tls-version string Minimum TLS version that is acceptable (default \[dq]tls1.0\[dq])
--rc-no-auth Don\[aq]t require auth for certain methods
--rc-pass string Password for authentication
--rc-realm string Realm for authentication
--rc-response-header stringArray Set HTTP header for all responses, overriding existing values
--rc-salt string Password hashing salt (default \[dq]dlPL2MqE\[dq])
--rc-serve Enable the serving of remote objects
--rc-serve-no-modtime Don\[aq]t read the modification time (can speed things up)
--rc-server-read-timeout Duration Timeout for server reading data (default 1h0m0s)
--rc-server-write-timeout Duration Timeout for server writing data (default 1h0m0s)
--rc-template string User-specified template
--rc-user string User name for authentication
--rc-user-from-header string User name from a defined HTTP header
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone hashsum
.PP
Produces a hashsum file for all the objects in the path.
.SS Synopsis
.PP
Produces a hash file for all the objects in the path using the hash
named.
The output is in the same format as the standard md5sum/sha1sum tool.
.PP
By default, the hash is requested from the remote.
If the hash is not supported by the remote, no hash will be returned.
With the download flag, the file will be downloaded from the remote and
hashed locally enabling any hash for any remote.
.PP
For the MD5 and SHA1 algorithms there are also dedicated commands,
md5sum (https://rclone.org/commands/rclone_md5sum/) and
sha1sum (https://rclone.org/commands/rclone_sha1sum/).
.PP
This command can also hash data received on standard input (stdin), by
not passing a remote:path, or by passing a hyphen as remote:path when
there is data to read (if not, the hyphen will be treated literally, as
a relative path).
.PP
Run without a hash to see the list of all supported hashes, e.g.
.IP
.nf
\f[C]
$ rclone hashsum
Supported hashes are:
- md5
- sha1
- whirlpool
- crc32
- sha256
- sha512
- blake3
- xxh3
- xxh128
- crc32c
\f[R]
.fi
.PP
Then
.IP
.nf
\f[C]
rclone hashsum MD5 remote:path
\f[R]
.fi
.PP
Note that hash names are case insensitive and values are output in lower
case.
.IP
.nf
\f[C]
rclone hashsum [<hash> remote:path] [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--base64 Output base64 encoded hashsum
-C, --checkfile string Validate hashes against a given SUM file instead of printing them
--download Download the file and hash it locally; if this flag is not specified, the hash is requested from the remote
-h, --help help for hashsum
--output-file string Output hashsums to a file rather than the terminal
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone index
.PP
Write static directory listings into a remote.
.SS Synopsis
.PP
Write a directory listing, \f[V]index.html\f[R] by default, into every
directory of \f[V]remote:path\f[R] so that it can be browsed when it is
served as a static website, for example from an S3 website endpoint, a
bucket behind a CDN, or a plain web server.
.PP
This works like \f[V]rclone sync\f[R]: each run makes the minimum
changes needed to bring the listings into line with the files.
Listings which haven\[aq]t changed aren\[aq]t rewritten, so a run with
no changes makes no uploads.
The listings never show the listing files themselves.
.PP
\f[B]Note\f[R] that \f[V]rclone index\f[R] treats every file with an
output name (\f[V]index.html\f[R] by default) in the directories it
indexes as its own, and will overwrite it or delete it without checking
where it came from.
To protect a hand-written index, exclude its directory with
\f[V]--index-exclude\f[R].
.SS Outputs
.PP
\f[V]--output NAME=FORMAT\f[R] says what to write in each directory and
can be repeated.
NAME is the file name, and FORMAT is one of the built-in formats below
or the path of a Go template file.
.PP
.TS
tab(@);
lw(19.3n) lw(26.6n) lw(24.1n).
T{
Format
T}@T{
MIME type
T}@T{
Contents
T}
_
T{
\f[V]html\f[R]
T}@T{
\f[V]text/html; charset=utf-8\f[R]
T}@T{
The HTML listing from the \f[V]rclone serve http\f[R] template
T}
T{
\f[V]json\f[R]
T}@T{
\f[V]application/json\f[R]
T}@T{
JSON in the format of \f[V]rclone lsjson\f[R] for the directory
T}
T{
\f[V]caddy\f[R]
T}@T{
\f[V]application/json\f[R]
T}@T{
JSON in the format of Caddy\[aq]s \f[V]file_server browse\f[R]
T}
.TE
.PP
The default is \f[V]--output index.html=html\f[R].
The built-in formats are templates, so they can be printed with
\f[V]--print-template FORMAT\f[R], copied and changed.
Outputs whose name ends in \f[V].html\f[R] or \f[V].htm\f[R] are
rendered with Go\[aq]s \f[V]html/template\f[R] and everything else with
\f[V]text/template\f[R], which has a \f[V]json\f[R] function for safe
encoding.
The template data is that of \f[V]rclone serve http\f[R] with
\f[V].Static\f[R] set (see rclone serve
http (https://rclone.org/commands/rclone_serve_http/#template)).
Outputs are uploaded with the MIME type of the built-in format, or that
of the output name\[aq]s extension for template outputs, since static
hosts serve the stored type.
.SS Filters
.PP
The normal filters (\f[V]--include\f[R], \f[V]--exclude\f[R],
\f[V]--filter-from\f[R], \f[V]--max-age\f[R], ...)
control what appears in the listings.
An excluded file isn\[aq]t listed, and an excluded directory isn\[aq]t
listed or indexed.
.PP
The \f[V]--index-include\f[R], \f[V]--index-exclude\f[R],
\f[V]--index-filter\f[R] flags and their \f[V]-from\f[R] variants
control which directories get listings.
They take the same patterns as the normal filters, applied to directory
paths, and \f[V]--index-include\f[R] implies excluding all other
directories.
A directory excluded here still appears in its parent\[aq]s listing, but
nothing is written or deleted inside it, so it can have its own
hand-made index.
\f[V]--index-max-depth\f[R] limits how deep listings are written.
.SS Modification times
.PP
Listings show the modification time of each file.
When using the s3, oracleobjectstorage and swift backends rclone stores
the modification time as metadata which isn\[aq]t returned by the bucket
listing, so \f[B]every object needs a HEAD request\f[R], which can mean
thousands of transactions per run.
Avoid this with one of:
.IP \[bu] 2
\f[V]--use-server-modtime\f[R] uses the time the object was uploaded
instead, which is what the web server sends as \f[V]Last-Modified\f[R].
Recommended for s3 unless the original modification times matter.
.IP \[bu] 2
\f[V]--no-modtime\f[R] shows no times at all, which is the cheapest
option.
.PP
\f[V]--dir-time\f[R] sets the time shown for directories:
.IP \[bu] 2
\f[V]newest\f[R] (default): the newest modification time of anything
below the directory.
Note that this means one new file changes the listing of every directory
above it.
.IP \[bu] 2
\f[V]dir\f[R]: the directory\[aq]s own modification time.
On most file systems writing a listing into a directory changes its
time, so this can take more than one run to settle.
.IP \[bu] 2
\f[V]none\f[R]: no time.
.PP
The listing files are given the newest modification time below their
directory, so the \f[V]Last-Modified\f[R] header of a listing is
meaningful.
.SS Links
.PP
Directory links are \f[V]dir/\f[R] by default, which works on hosts that
serve index documents: S3 website endpoints, GCS and Azure static
websites, nginx and Apache, and R2 custom domains with a URL rewrite
rule.
For hosts that don\[aq]t (plain S3 REST URLs, B2 friendly URLs) use
\f[V]--link-index\f[R] to make directory links \f[V]dir/index.html\f[R]
instead.
.SS Partial runs
.PP
After a sync which changed a known set of files there is no need to walk
the whole remote.
Tell \f[V]rclone index\f[R] what changed and it re-indexes only the
directories that could be affected:
.IP
.nf
\f[C]
rclone index r2:bucket --changed v1.76.0/ --changed version.txt
rclone index r2:bucket --changed-from changes.txt
rclone sync ./public r2:bucket --exclude index.html --combined - | rclone index r2:bucket --changed-combined -
\f[R]
.fi
.IP \[bu] 2
\f[V]--changed PATH\f[R] names a changed file or directory relative to
\f[V]remote:path\f[R] and can be repeated.
A directory, given with a trailing slash or found to be one, is
re-indexed completely.
.IP \[bu] 2
\f[V]--changed-from FILE\f[R] reads one path per line exactly as
written.
.IP \[bu] 2
\f[V]--changed-combined FILE\f[R] reads the \f[V]--combined\f[R] report
of \f[V]rclone sync\f[R]: lines starting with \f[V]+\f[R], \f[V]-\f[R],
\f[V]*\f[R] and \f[V]!\f[R] are changes and \f[V]=\f[R] lines are
ignored.
.IP \[bu] 2
Both files accept \f[V]-\f[R] for standard input and all three flags can
be combined.
.PP
A changed file re-indexes its directory and every directory above it,
since their times and their listings can change too, and on bucket based
storage a directory can cease to exist.
Each of those is one directory listing.
With \f[V]--dir-time newest\f[R] the directories above also need the
times of their unchanged subdirectories, which are read from the
modification times of those subdirectories\[aq] listings at the cost of
one small request each.
With \f[V]--use-server-modtime\f[R] that is the time the listing was
written rather than the time of the newest file, so partial runs can
drift by the indexing delay until the next full run.
\f[V]--dir-time dir\f[R] and \f[V]none\f[R] need no such lookups.
.PP
Directories which are neither named nor above a named path are left
alone, as are directories deeper than \f[V]--max-depth\f[R].
An empty change list does nothing, and naming the root does a full run.
There is no automatic cutover to a full run since that depends on the
size of the whole remote: a partial run costs one listing per affected
directory, a full run one request per thousand objects on S3-like
storage or one per directory elsewhere.
The number of directories a partial run will list is logged with
\f[V]-v\f[R], and \f[V]--changed-max-dirs\f[R] makes it fall back to a
full run above that number.
A good pattern is a partial run after each upload and a scheduled full
run to catch anything missed.
.SS Site icon
.PP
The listings carry no icon or branding of their own.
To give a site an icon, upload a \f[V]favicon.ico\f[R] to the root of
the remote, which browsers fetch from there for every page.
Exclude it from the listings with \f[V]--exclude /favicon.ico\f[R] so it
stays on the site but isn\[aq]t shown.
.SS Deleting listings
.PP
On backends which can\[aq]t have empty directories (S3, B2 and other
bucket-based storage) a directory only exists while it has files in it.
Once the last file in a directory has been removed its listing is
deleted, since the directory only existed because of it.
Backends which can have empty directories keep a listing for each empty
directory.
.SS Using with sync
.PP
A sync from a local build deletes files on the destination which
aren\[aq]t in the source, which includes the listings.
Either index the local build before syncing:
.IP
.nf
\f[C]
rclone index ./public
rclone sync ./public r2:bucket
\f[R]
.fi
.PP
or exclude the listings from the sync so it neither uploads nor deletes
them, then index the remote:
.IP
.nf
\f[C]
rclone sync ./public r2:bucket --exclude index.html
rclone index r2:bucket
\f[R]
.fi
.SS Examples
.PP
An S3 website bucket, using the upload times so no object needs a HEAD
request:
.IP
.nf
\f[C]
rclone index s3:my-site --use-server-modtime
\f[R]
.fi
.PP
HTML and rclone JSON listings, setting \f[V]Cache-Control\f[R] on them:
.IP
.nf
\f[C]
rclone index s3:bucket --output index.html=html --output index.json=json --header-upload \[dq]Cache-Control: max-age=300\[dq]
\f[R]
.fi
.PP
Only list release files, and don\[aq]t write listings under
\f[V]/private\f[R]:
.IP
.nf
\f[C]
rclone index r2:bucket --include \[dq]*.{zip,deb,rpm}\[dq] --index-exclude \[dq]/private/**\[dq]
\f[R]
.fi
.PP
A B2 bucket served from its friendly URLs:
.IP
.nf
\f[C]
rclone index b2:bucket --link-index
\f[R]
.fi
.PP
See what would change:
.IP
.nf
\f[C]
rclone index r2:bucket --dry-run -v
\f[R]
.fi
.PP
Listings which haven\[aq]t changed aren\[aq]t normally rewritten, so
changing the headers or metadata set on them needs
\f[V]--index-rewrite\f[R], which writes every listing a run would render
whether it changed or not:
.IP
.nf
\f[C]
rclone index r2:bucket --index-rewrite --header-upload \[dq]Cache-Control: max-age=3600\[dq]
\f[R]
.fi
.IP
.nf
\f[C]
rclone index remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--changed stringArray Only re-index directories affected by this changed path (directories end in /)
--changed-combined stringArray Read changed paths from a sync --combined report (use - to read from stdin)
--changed-from stringArray Read changed paths from file, one per line (use - to read from stdin)
--changed-max-dirs int Do a full index if a partial one would list more than this many directories (0 for no limit)
--dir-time newest|dir|none How to work out the time shown for a directory (default newest)
-h, --help help for index
--index-exclude stringArray Don\[aq]t write listings in directories matching pattern
--index-exclude-from stringArray Read directory exclude patterns from file (use - to read from stdin)
--index-filter stringArray Add a rule for which directories get listings
--index-filter-from stringArray Read directory rules from a file (use - to read from stdin)
--index-include stringArray Only write listings in directories matching pattern
--index-include-from stringArray Read directory include patterns from file (use - to read from stdin)
--index-max-depth int Only write listings this many directories deep (-1 for no limit) (default -1)
--index-rewrite Write every listing even if it is unchanged
--link-index Link to dir/NAME rather than dir/ for hosts without index documents
--no-modtime Don\[aq]t show modification times in listings
--output stringArray Listing to write in each directory as NAME=FORMAT (default [index.html=html])
--print-template string Print the built-in template for FORMAT and exit
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Copy Options
.PP
Flags for anything which can copy a file
.IP
.nf
\f[C]
--check-first Do all the checks before starting transfers
-c, --checksum Check for changes with size & checksum (if available, or fallback to size only)
--compare-dest stringArray Include additional server-side paths during comparison
--copy-dest stringArray Implies --compare-dest but also copies files from paths into destination
--cutoff-mode HARD|SOFT|CAUTIOUS Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
--ignore-case-sync Ignore case when synchronizing
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
-I, --ignore-times Don\[aq]t skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
-l, --links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
--max-duration Duration Maximum duration rclone will transfer data for (default 0s)
--max-transfer SizeSuffix Maximum size of data to transfer (default off)
-M, --metadata If set, preserve metadata when copying objects
--modify-window Duration Max time diff to be considered the same (default 1ns)
--multi-thread-chunk-size SizeSuffix Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
--multi-thread-cutoff SizeSuffix Use multi-thread downloads for files above this size (default 256Mi)
--multi-thread-streams int Number of streams to use for multi-thread downloads (default 4)
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--name-transform stringArray Transform paths during the copy process
--no-check-dest Don\[aq]t check the destination, copy regardless
--no-traverse Don\[aq]t traverse destination file system on copy
--no-update-dir-modtime Don\[aq]t update directory modification times
--no-update-modtime Don\[aq]t update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. \[aq]size,descending\[aq]
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default \[dq].partial\[dq])
--refresh-times Refresh the modtime of remote files
--server-side-across-configs Allow server-side operations (e.g. copy) to work across different configs
--size-only Skip based on size only, not modtime or checksum
--streaming-upload-cutoff SizeSuffix Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
-u, --update Skip files that are newer on the destination
\f[R]
.fi
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone link
.PP
Generate public link to file/folder.
.SS Synopsis
.PP
Create, retrieve or remove a public link to the given file or folder.
.IP
.nf
\f[C]
rclone link remote:path/to/file
rclone link remote:path/to/folder/
rclone link --unlink remote:path/to/folder/
rclone link --expire 1d remote:path/to/file
\f[R]
.fi
.PP
If you supply the --expire flag, it will set the expiration time
otherwise it will use the default (100 years).
\f[B]Note\f[R] not all backends support the --expire flag - if the
backend doesn\[aq]t support it then the link returned won\[aq]t expire.
.PP
Use the --unlink flag to remove existing public links to the file or
folder.
\f[B]Note\f[R] not all backends support \[dq]--unlink\[dq] flag - those
that don\[aq]t will just ignore it.
.PP
If successful, the last line of the output will contain the link.
Exact capabilities depend on the remote, but the link will always by
default be created with the least constraints - e.g.
no expiry, no password protection, accessible without account.
.IP
.nf
\f[C]
rclone link remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--expire Duration The amount of time that the link will be valid (default off)
-h, --help help for link
--unlink Remove existing public link to file/folder
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone listremotes
.PP
List all the remotes in the config file and defined in environment
variables.
.SS Synopsis
.PP
Lists all the available remotes from the config file, or the remotes
matching an optional filter.
.PP
Prints the result in human-readable format by default, and as a simple
list of remote names, or if used with flag \f[V]--long\f[R] a tabular
format including the remote names, types and descriptions.
Using flag \f[V]--json\f[R] produces machine-readable output instead,
which always includes all attributes - including the source (file or
environment).
.PP
Result can be filtered by a filter argument which applies to all
attributes, and/or filter flags specific for each attribute.
The values must be specified according to regular rclone filtering
pattern syntax.
.PP
By default filtering uses non-anchored matching, so \f[V]--type box\f[R]
also matches \f[V]dropbox\f[R].
Use \f[V]--exact\f[R] to match complete values only.
.IP
.nf
\f[C]
rclone listremotes [<filter>] [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--description string Filter remotes by description
--exact Match filter strings exactly instead of using non-anchored glob matching
-h, --help help for listremotes
--json Format output as JSON
--long Show type and description in addition to name
--name string Filter remotes by name
--order-by string Instructions on how to order the result, e.g. \[aq]type,name=descending\[aq]
--source string Filter remotes by source, e.g. \[aq]file\[aq] or \[aq]environment\[aq]
--type string Filter remotes by type
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone lsf
.PP
List directories and objects in remote:path formatted for parsing.
.SS Synopsis
.PP
List the contents of the source path (directories and objects) to
standard output in a form which is easy to parse by scripts.
By default this will just be the names of the objects and directories,
one per line.
The directories will have a / suffix.
.PP
E.g.
.IP
.nf
\f[C]
$ rclone lsf swift:bucket
bevajer5jef
canole
diwogej7
ferejej3gux/
fubuwic
\f[R]
.fi
.PP
Use the \f[V]--format\f[R] option to control what gets listed.
By default this is just the path, but you can use these parameters to
control the output:
.IP
.nf
\f[C]
p - path
s - size
t - modification time
h - hash
i - ID of object
o - Original ID of underlying object
m - MimeType of object if known
e - encrypted name
T - tier of storage if known, e.g. \[dq]Hot\[dq] or \[dq]Cool\[dq]
M - Metadata of object in JSON blob format, eg {\[dq]key\[dq]:\[dq]value\[dq]}
\f[R]
.fi
.PP
Some backends use composite IDs.
In particular, Google Drive shortcuts are normally dereferenced, and
their \[dq]i\[dq] field contains the target object\[aq]s ID followed by
the shortcut\[aq]s ID, separated by a tab.
This tab is part of the ID field and is not changed by
\f[V]--separator\f[R].
Use \f[V]--drive-skip-shortcuts\f[R] to omit shortcut entries.
.PP
So if you wanted the path, size and modification time, you would use
\f[V]--format \[dq]pst\[dq]\f[R], or maybe
\f[V]--format \[dq]tsp\[dq]\f[R] to put the path last.
.PP
E.g.
.IP
.nf
\f[C]
$ rclone lsf --format \[dq]tsp\[dq] swift:bucket
2016-06-25 18:55:41;60295;bevajer5jef
2016-06-25 18:55:43;90613;canole
2016-06-25 18:55:43;94467;diwogej7
2018-04-26 08:50:45;0;ferejej3gux/
2016-06-25 18:55:40;37600;fubuwic
\f[R]
.fi
.PP
If you specify \[dq]h\[dq] in the format you will get the MD5 hash by
default, use the \f[V]--hash\f[R] flag to change which hash you want.
Note that this can be returned as an empty string if it isn\[aq]t
available on the object (and for directories), \[dq]ERROR\[dq] if there
was an error reading it from the object and \[dq]UNSUPPORTED\[dq] if
that object does not support that hash type.
.PP
For example, to emulate the md5sum command you can use
.IP
.nf
\f[C]
rclone lsf -R --hash MD5 --format hp --separator \[dq] \[dq] --files-only .
\f[R]
.fi
.PP
E.g.
.IP
.nf
\f[C]
$ rclone lsf -R --hash MD5 --format hp --separator \[dq] \[dq] --files-only swift:bucket
7908e352297f0f530b84a756f188baa3 bevajer5jef
cd65ac234e6fea5925974a51cdd865cc canole
03b5341b4f234b9d984d03ad076bae91 diwogej7
8fd37c3810dd660778137ac3a66cc06d fubuwic
99713e14a4c4ff553acaf1930fad985b gixacuh7ku
\f[R]
.fi
.PP
(Though \[dq]rclone md5sum .\[dq] is an easier way of typing this.)
.PP
By default the separator is \[dq];\[dq] this can be changed with the
\f[V]--separator\f[R] flag.
Note that separators aren\[aq]t escaped in the path so putting it last
is a good strategy.
.PP
E.g.
.IP
.nf
\f[C]
$ rclone lsf --separator \[dq],\[dq] --format \[dq]tshp\[dq] swift:bucket
2016-06-25 18:55:41,60295,7908e352297f0f530b84a756f188baa3,bevajer5jef
2016-06-25 18:55:43,90613,cd65ac234e6fea5925974a51cdd865cc,canole
2016-06-25 18:55:43,94467,03b5341b4f234b9d984d03ad076bae91,diwogej7
2018-04-26 08:52:53,0,,ferejej3gux/
2016-06-25 18:55:40,37600,8fd37c3810dd660778137ac3a66cc06d,fubuwic
\f[R]
.fi
.PP
You can output in CSV standard format.
This will escape things in \[dq] if they contain,
.PP
E.g.
.IP
.nf
\f[C]
$ rclone lsf --csv --files-only --format ps remote:path
test.log,22355
test.sh,449
\[dq]this file contains a comma, in the file name.txt\[dq],6
\f[R]
.fi
.PP
Note that the \f[V]--absolute\f[R] parameter is useful for making lists
of files to pass to an rclone copy with the \f[V]--files-from-raw\f[R]
flag.
.PP
For example, to find all the files modified within one day and copy
those only (without traversing the whole directory structure):
.IP
.nf
\f[C]
rclone lsf --absolute --files-only --max-age 1d /path/to/local > new_files
rclone copy --files-from-raw new_files /path/to/local remote:path
\f[R]
.fi
.PP
The default time format is \f[V]\[aq]2006-01-02 15:04:05\[aq]\f[R].
Other formats (https://pkg.go.dev/time#pkg-constants) can be specified
with the \f[V]--time-format\f[R] flag.
Examples:
.IP
.nf
\f[C]
rclone lsf remote:path --format pt --time-format \[aq]Jan 2, 2006 at 3:04pm (MST)\[aq]
rclone lsf remote:path --format pt --time-format \[aq]2006-01-02 15:04:05.000000000\[aq]
rclone lsf remote:path --format pt --time-format \[aq]2006-01-02T15:04:05.999999999Z07:00\[aq]
rclone lsf remote:path --format pt --time-format RFC3339
rclone lsf remote:path --format pt --time-format DateOnly
rclone lsf remote:path --format pt --time-format max
rclone lsf remote:path --format pt --time-format unix
rclone lsf remote:path --format pt --time-format unixnano
\f[R]
.fi
.PP
\f[V]--time-format max\f[R] will automatically truncate
\f[V]2006-01-02 15:04:05.000000000\f[R] to the maximum precision
supported by the remote.
.PP
Any of the filtering options can be applied to this command.
.PP
There are several related list commands
.IP \[bu] 2
\f[V]ls\f[R] to list size and path of objects only
.IP \[bu] 2
\f[V]lsl\f[R] to list modification time, size and path of objects only
.IP \[bu] 2
\f[V]lsd\f[R] to list directories only
.IP \[bu] 2
\f[V]lsf\f[R] to list objects and directories in easy to parse format
.IP \[bu] 2
\f[V]lsjson\f[R] to list objects and directories in JSON format
.PP
\f[V]ls\f[R],\f[V]lsl\f[R],\f[V]lsd\f[R] are designed to be
human-readable.
\f[V]lsf\f[R] is designed to be human and machine-readable.
\f[V]lsjson\f[R] is designed to be machine-readable.
.PP
Note that \f[V]ls\f[R] and \f[V]lsl\f[R] recurse by default - use
\f[V]--max-depth 1\f[R] to stop the recursion.
.PP
The other list commands \f[V]lsd\f[R],\f[V]lsf\f[R],\f[V]lsjson\f[R] do
not recurse by default - use \f[V]-R\f[R] to make them recurse.
.PP
On the bucket-based remotes (e.g.
s3, gcs, b2) a directory is a key prefix rather than an object, so a
listing without \f[V]-R\f[R] shows each prefix as one directory entry
and not the objects stored under it.
.PP
List commands prefer a recursive method that uses more memory but fewer
transactions by default.
Use \f[V]--disable ListR\f[R] to suppress the behavior.
See \f[V]--fast-list\f[R] (https://rclone.org/docs/#fast-list) for more
details.
.PP
Listing a nonexistent directory will produce an error except for remotes
which can\[aq]t have empty directories (e.g.
s3, swift, or gcs - the bucket-based remotes).
.IP
.nf
\f[C]
rclone lsf remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--absolute Put a leading / in front of path names
--csv Output in CSV format
-d, --dir-slash Append a slash to directory names (default true)
--dirs-only Only list directories
--files-only Only list files
-F, --format string Output format - see help for details (default \[dq]p\[dq])
--hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default \[dq]md5\[dq])
-h, --help help for lsf
-R, --recursive Recurse into the listing
-s, --separator string Separator for the items in the format (default \[dq];\[dq])
-t, --time-format string Specify a custom time format - see docs for details (default: 2006-01-02 15:04:05)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone lsjson
.PP
List directories and objects in the path in JSON format.
.SS Synopsis
.PP
List directories and objects in the path in JSON format.
.PP
The output is an array of Items, where each Item looks like this:
.IP
.nf
\f[C]
{
\[dq]Hashes\[dq] : {
\[dq]SHA-1\[dq] : \[dq]f572d396fae9206628714fb2ce00f72e94f2258f\[dq],
\[dq]MD5\[dq] : \[dq]b1946ac92492d2347c6235b4d2611184\[dq],
\[dq]DropboxHash\[dq] : \[dq]ecb65bb98f9d905b70458986c39fcbad7715e5f2fcc3b1f07767d7c83e2438cc\[dq]
},
\[dq]ID\[dq]: \[dq]y2djkhiujf83u33\[dq],
\[dq]OrigID\[dq]: \[dq]UYOJVTUW00Q1RzTDA\[dq],
\[dq]IsBucket\[dq] : false,
\[dq]IsDir\[dq] : false,
\[dq]MimeType\[dq] : \[dq]application/octet-stream\[dq],
\[dq]ModTime\[dq] : \[dq]2017-05-31T16:15:57.034468261+01:00\[dq],
\[dq]Name\[dq] : \[dq]file.txt\[dq],
\[dq]Encrypted\[dq] : \[dq]v0qpsdq8anpci8n929v3uu9338\[dq],
\[dq]EncryptedPath\[dq] : \[dq]kja9098349023498/v0qpsdq8anpci8n929v3uu9338\[dq],
\[dq]Path\[dq] : \[dq]full/path/goes/here/file.txt\[dq],
\[dq]Size\[dq] : 6,
\[dq]Tier\[dq] : \[dq]hot\[dq],
}
\f[R]
.fi
.PP
The exact set of properties included depends on the backend:
.IP \[bu] 2
The property IsBucket will only be included for bucket-based remotes,
and only for directories that are buckets.
It will always be omitted when value is not true.
.IP \[bu] 2
Properties Encrypted and EncryptedPath will only be included for
encrypted remotes, and (as mentioned below) only if the
\f[V]--encrypted\f[R] option is set.
.PP
Different options may also affect which properties are included:
.IP \[bu] 2
If \f[V]--hash\f[R] is not specified, the Hashes property will be
omitted.
The types of hash can be specified with the \f[V]--hash-type\f[R]
parameter (which may be repeated).
If \f[V]--hash-type\f[R] is set then it implies \f[V]--hash\f[R].
.IP \[bu] 2
If \f[V]--no-modtime\f[R] is specified then ModTime will be blank.
This can speed things up on remotes where reading the ModTime takes an
extra request (e.g.
s3, swift).
.IP \[bu] 2
If \f[V]--no-mimetype\f[R] is specified then MimeType will be blank.
This can speed things up on remotes where reading the MimeType takes an
extra request (e.g.
s3, swift).
.IP \[bu] 2
If \f[V]--encrypted\f[R] is not specified the Encrypted and
EncryptedPath properties will be omitted - even for encrypted remotes.
.IP \[bu] 2
If \f[V]--metadata\f[R] is set then an additional Metadata property will
be returned.
This will have metadata (https://rclone.org/docs/#metadata) in rclone
standard format as a JSON object.
.PP
The default is to list directories and files/objects, but this can be
changed with the following options:
.IP \[bu] 2
If \f[V]--dirs-only\f[R] is specified then directories will be returned
only, no files/objects.
.IP \[bu] 2
If \f[V]--files-only\f[R] is specified then files will be returned only,
no directories.
.PP
If \f[V]--stat\f[R] is set then the output is not an array of items, but
instead a single JSON blob will be returned about the item pointed to.
This will return an error if the item isn\[aq]t found, however on bucket
based backends (like s3, gcs, b2, azureblob etc) if the item isn\[aq]t
found it will return an empty directory, as it isn\[aq]t possible to
tell empty directories from missing directories there.
.PP
The Path field will only show folders below the remote path being
listed.
If \[dq]remote:path\[dq] contains the file \[dq]subfolder/file.txt\[dq],
the Path for \[dq]file.txt\[dq] will be \[dq]subfolder/file.txt\[dq],
not \[dq]remote:path/subfolder/file.txt\[dq].
When used without \f[V]--recursive\f[R] the Path will always be the same
as Name.
.PP
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
nearest millisecond (e.g.
Google Drive) then 3 digits will always be shown
(\[dq]2017-05-31T16:15:57.034+01:00\[dq]) whereas if the times are
accurate to the nearest second (Dropbox, Box, WebDav, etc.)
no digits will be shown (\[dq]2017-05-31T16:15:57+01:00\[dq]).
.PP
The whole output can be processed as a JSON blob, or alternatively it
can be processed line by line as each item is written on individual
lines (except with \f[V]--stat\f[R]).
.PP
Any of the filtering options can be applied to this command.
.PP
There are several related list commands
.IP \[bu] 2
\f[V]ls\f[R] to list size and path of objects only
.IP \[bu] 2
\f[V]lsl\f[R] to list modification time, size and path of objects only
.IP \[bu] 2
\f[V]lsd\f[R] to list directories only
.IP \[bu] 2
\f[V]lsf\f[R] to list objects and directories in easy to parse format
.IP \[bu] 2
\f[V]lsjson\f[R] to list objects and directories in JSON format
.PP
\f[V]ls\f[R],\f[V]lsl\f[R],\f[V]lsd\f[R] are designed to be
human-readable.
\f[V]lsf\f[R] is designed to be human and machine-readable.
\f[V]lsjson\f[R] is designed to be machine-readable.
.PP
Note that \f[V]ls\f[R] and \f[V]lsl\f[R] recurse by default - use
\f[V]--max-depth 1\f[R] to stop the recursion.
.PP
The other list commands \f[V]lsd\f[R],\f[V]lsf\f[R],\f[V]lsjson\f[R] do
not recurse by default - use \f[V]-R\f[R] to make them recurse.
.PP
On the bucket-based remotes (e.g.
s3, gcs, b2) a directory is a key prefix rather than an object, so a
listing without \f[V]-R\f[R] shows each prefix as one directory entry
and not the objects stored under it.
.PP
List commands prefer a recursive method that uses more memory but fewer
transactions by default.
Use \f[V]--disable ListR\f[R] to suppress the behavior.
See \f[V]--fast-list\f[R] (https://rclone.org/docs/#fast-list) for more
details.
.PP
Listing a nonexistent directory will produce an error except for remotes
which can\[aq]t have empty directories (e.g.
s3, swift, or gcs - the bucket-based remotes).
.IP
.nf
\f[C]
rclone lsjson remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--dirs-only Show only directories in the listing
--encrypted Show the encrypted names
--files-only Show only files in the listing
--hash Include hashes in the output (may take longer)
--hash-type stringArray Show only this hash type (may be repeated)
-h, --help help for lsjson
-M, --metadata Add metadata to the listing
--no-mimetype Don\[aq]t read the mime type (can speed things up)
--no-modtime Don\[aq]t read the modification time (can speed things up)
--original Show the ID of the underlying Object
-R, --recursive Recurse into the listing
--stat Just return the info for the pointed to file
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone mount
.PP
Mount the remote as file system on a mountpoint.
.SS Synopsis
.PP
Rclone mount allows Linux, FreeBSD, macOS and Windows to mount any of
Rclone\[aq]s cloud storage systems as a file system with FUSE.
.PP
First set up your remote using \f[V]rclone config\f[R].
Check it works with \f[V]rclone ls\f[R] etc.
.PP
On Linux and macOS, you can run mount in either foreground or background
(aka daemon) mode.
Mount runs in foreground mode by default.
Use the \f[V]--daemon\f[R] flag to force background mode.
On Windows you can run mount in foreground only, the flag is ignored.
.PP
In background mode rclone acts as a generic Unix mount program: the main
program starts, spawns background rclone process to setup and maintain
the mount, waits until success or timeout and exits with appropriate
code (killing the child process if it fails).
.PP
On Linux/macOS/FreeBSD start the mount like this, where
\f[V]/path/to/local/mount\f[R] is an \f[B]empty\f[R] \f[B]existing\f[R]
directory:
.IP
.nf
\f[C]
rclone mount remote:path/to/files /path/to/local/mount
\f[R]
.fi
.PP
On Windows you can start a mount in different ways.
See below for details.
If foreground mount is used interactively from a console window, rclone
will serve the mount and occupy the console so another window should be
used to work with the mount until rclone is interrupted e.g.
by pressing Ctrl-C.
.PP
The following examples will mount to an automatically assigned drive, to
specific drive letter \f[V]X:\f[R], to path
\f[V]C:\[rs]path\[rs]parent\[rs]mount\f[R] (where parent directory or
drive must exist, and mount must \f[B]not\f[R] exist, and is not
supported when mounting as a network drive), and the last example will
mount as network share \f[V]\[rs]\[rs]cloud\[rs]remote\f[R] and map it
to an automatically assigned drive:
.IP
.nf
\f[C]
rclone mount remote:path/to/files *
rclone mount remote:path/to/files X:
rclone mount remote:path/to/files C:\[rs]path\[rs]parent\[rs]mount
rclone mount remote:path/to/files \[rs]\[rs]cloud\[rs]remote
\f[R]
.fi
.PP
When the program ends while in foreground mode, either via Ctrl+C or
receiving a SIGINT or SIGTERM signal, the mount should be automatically
stopped.
.PP
When running in background mode the user will have to stop the mount
manually:
.IP
.nf
\f[C]
# Linux
fusermount -u /path/to/local/mount
#... or on some systems
fusermount3 -u /path/to/local/mount
# OS X or Linux when using nfsmount
umount /path/to/local/mount
\f[R]
.fi
.PP
The umount operation can fail, for example when the mountpoint is busy.
When that happens, it is the user\[aq]s responsibility to stop the mount
manually.
.PP
The size of the mounted file system will be set according to information
retrieved from the remote, the same as returned by the rclone
about (https://rclone.org/commands/rclone_about/) command.
Remotes with unlimited storage may report the used size only, then an
additional 1 PiB of free space is assumed.
If the remote does not
support (https://rclone.org/overview/#optional-features) the about
feature at all, then 1 PiB is set as both the total and the free size.
.SS Installing on Windows
.PP
To run \f[V]rclone mount on Windows\f[R], you will need to download and
install WinFsp (https://winfsp.dev).
.PP
WinFsp (https://github.com/winfsp/winfsp) is an open-source Windows File
System Proxy which makes it easy to write user space file systems for
Windows.
It provides a FUSE emulation layer which rclone uses combination with
cgofuse (https://github.com/winfsp/cgofuse).
Both of these packages are by Bill Zissimopoulos who was very helpful
during the implementation of rclone mount for Windows.
.SS Mounting modes on windows
.PP
Unlike other operating systems, Microsoft Windows provides a different
filesystem type for network and fixed drives.
It optimises access on the assumption fixed disk drives are fast and
reliable, while network drives have relatively high latency and less
reliability.
Some settings can also be differentiated between the two types, for
example that Windows Explorer should just display icons and not create
preview thumbnails for image and video files on network drives.
.PP
In most cases, rclone will mount the remote as a normal, fixed disk
drive by default.
However, you can also choose to mount it as a remote network drive,
often described as a network share.
If you mount an rclone remote using the default, fixed drive mode and
experience unexpected program errors, freezes or other issues, consider
mounting as a network drive instead.
.PP
When mounting as a fixed disk drive you can either mount to an unused
drive letter, or to a path representing a \f[B]nonexistent\f[R]
subdirectory of an \f[B]existing\f[R] parent directory or drive.
Using the special value \f[V]*\f[R] will tell rclone to automatically
assign the next available drive letter, starting with Z: and moving
backward.
Examples:
.IP
.nf
\f[C]
rclone mount remote:path/to/files *
rclone mount remote:path/to/files X:
rclone mount remote:path/to/files C:\[rs]path\[rs]parent\[rs]mount
rclone mount remote:path/to/files X:
\f[R]
.fi
.PP
Option \f[V]--volname\f[R] can be used to set a custom volume name for
the mounted file system.
The default is to use the remote name and path.
.PP
To mount as network drive, you can add option \f[V]--network-mode\f[R]
to your mount command.
Mounting to a directory path is not supported in this mode, it is a
limitation Windows imposes on junctions, so the remote must always be
mounted to a drive letter.
.IP
.nf
\f[C]
rclone mount remote:path/to/files X: --network-mode
\f[R]
.fi
.PP
A volume name specified with \f[V]--volname\f[R] will be used to create
the network share path.
A complete UNC path, such as \f[V]\[rs]\[rs]cloud\[rs]remote\f[R],
optionally with path
\f[V]\[rs]\[rs]cloud\[rs]remote\[rs]madeup\[rs]path\f[R], will be used
as is.
Any other string will be used as the share part, after a default prefix
\f[V]\[rs]\[rs]server\[rs]\f[R].
If no volume name is specified then \f[V]\[rs]\[rs]server\[rs]share\f[R]
will be used.
You must make sure the volume name is unique when you are mounting more
than one drive, or else the mount command will fail.
The share name will treated as the volume label for the mapped drive,
shown in Windows Explorer etc, while the complete
\f[V]\[rs]\[rs]server\[rs]share\f[R] will be reported as the remote UNC
path by \f[V]net use\f[R] etc, just like a normal network drive mapping.
.PP
If you specify a full network share UNC path with \f[V]--volname\f[R],
this will implicitly set the \f[V]--network-mode\f[R] option, so the
following two examples have same result:
.IP
.nf
\f[C]
rclone mount remote:path/to/files X: --network-mode
rclone mount remote:path/to/files X: --volname \[rs]\[rs]server\[rs]share
\f[R]
.fi
.PP
You may also specify the network share UNC path as the mountpoint
itself.
Then rclone will automatically assign a drive letter, same as with
\f[V]*\f[R] and use that as mountpoint, and instead use the UNC path
specified as the volume name, as if it were specified with the
\f[V]--volname\f[R] option.
This will also implicitly set the \f[V]--network-mode\f[R] option.
This means the following two examples have same result:
.IP
.nf
\f[C]
rclone mount remote:path/to/files \[rs]\[rs]cloud\[rs]remote
rclone mount remote:path/to/files * --volname \[rs]\[rs]cloud\[rs]remote
\f[R]
.fi
.PP
There is yet another way to enable network mode, and to set the share
path, and that is to pass the \[dq]native\[dq] libfuse/WinFsp option
directly: \f[V]--fuse-flag --VolumePrefix=\[rs]server\[rs]share\f[R].
Note that the path must be with just a single backslash prefix in this
case.
.PP
\f[I]Note:\f[R] In previous versions of rclone this was the only
supported method.
.PP
Read more about drive
mapping (https://en.wikipedia.org/wiki/Drive_mapping)
.PP
See also Limitations section below.
.SS Windows filesystem permissions
.PP
The FUSE emulation layer on Windows must convert between the POSIX-based
permission model used in FUSE, and the permission model used in Windows,
based on access-control lists (ACL).
.PP
The mounted filesystem will normally get three entries in its
access-control list (ACL), representing permissions for the POSIX
permission scopes: Owner, group and others.
By default, the owner and group will be taken from the current user, and
the built-in group \[dq]Everyone\[dq] will be used to represent others.
The user/group can be customized with FUSE options \[dq]UserName\[dq]
and \[dq]GroupName\[dq], e.g.
\f[V]-o UserName=user123 -o GroupName=\[dq]Authenticated Users\[dq]\f[R].
The permissions on each entry will be set according to options
\f[V]--dir-perms\f[R] and \f[V]--file-perms\f[R], which takes a value in
traditional Unix numeric
notation (https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation).
.PP
The default permissions corresponds to
\f[V]--file-perms 0666 --dir-perms 0777\f[R], i.e.
read and write permissions to everyone.
This means you will not be able to start any programs from the mount.
To be able to do that you must add execute permissions, e.g.
\f[V]--file-perms 0777 --dir-perms 0777\f[R] to add it to everyone.
If the program needs to write files, chances are you will have to enable
VFS File Caching as well (see also limitations).
Note that the default write permission have some restrictions for
accounts other than the owner, specifically it lacks the \[dq]write
extended attributes\[dq], as explained next.
.PP
The mapping of permissions is not always trivial, and the result you see
in Windows Explorer may not be exactly like you expected.
For example, when setting a value that includes write access for the
group or others scope, this will be mapped to individual permissions
\[dq]write attributes\[dq], \[dq]write data\[dq] and \[dq]append
data\[dq], but not \[dq]write extended attributes\[dq].
Windows will then show this as basic permission \[dq]Special\[dq]
instead of \[dq]Write\[dq], because \[dq]Write\[dq] also covers the
\[dq]write extended attributes\[dq] permission.
When setting digit 0 for group or others, to indicate no permissions,
they will still get individual permissions \[dq]read attributes\[dq],
\[dq]read extended attributes\[dq] and \[dq]read permissions\[dq].
This is done for compatibility reasons, e.g.
to allow users without additional permissions to be able to read basic
metadata about files like in Unix.
.PP
WinFsp 2021 (version 1.9) introduced a new FUSE option
\[dq]FileSecurity\[dq], that allows the complete specification of file
security descriptors using
SDDL (https://docs.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-string-format).
With this you get detailed control of the resulting permissions,
compared to use of the POSIX permissions described above, and no
additional permissions will be added automatically for compatibility
with Unix.
Some example use cases will following.
.PP
If you set POSIX permissions for only allowing access to the owner,
using \f[V]--file-perms 0600 --dir-perms 0700\f[R], the user group and
the built-in \[dq]Everyone\[dq] group will still be given some special
permissions, as described above.
Some programs may then (incorrectly) interpret this as the file being
accessible by everyone, for example an SSH client may warn about
\[dq]unprotected private key file\[dq].
You can work around this by specifying
\f[V]-o FileSecurity=\[dq]D:P(A;;FA;;;OW)\[dq]\f[R], which sets file all
access (FA) to the owner (OW), and nothing else.
.PP
When setting write permissions then, except for the owner, this does not
include the \[dq]write extended attributes\[dq] permission, as mentioned
above.
This may prevent applications from writing to files, giving permission
denied error instead.
To set working write permissions for the built-in \[dq]Everyone\[dq]
group, similar to what it gets by default but with the addition of the
\[dq]write extended attributes\[dq], you can specify
\f[V]-o FileSecurity=\[dq]D:P(A;;FRFW;;;WD)\[dq]\f[R], which sets file
read (FR) and file write (FW) to everyone (WD).
If file execute (FX) is also needed, then change to
\f[V]-o FileSecurity=\[dq]D:P(A;;FRFWFX;;;WD)\[dq]\f[R], or set file all
access (FA) to get full access permissions, including delete, with
\f[V]-o FileSecurity=\[dq]D:P(A;;FA;;;WD)\[dq]\f[R].
.SS Windows caveats
.PP
Drives created as Administrator are not visible to other accounts, not
even an account that was elevated to Administrator with the User Account
Control (UAC) feature.
A result of this is that if you mount to a drive letter from a Command
Prompt run as Administrator, and then try to access the same drive from
Windows Explorer (which does not run as Administrator), you will not be
able to see the mounted drive.
.PP
If you don\[aq]t need to access the drive from applications running with
administrative privileges, the easiest way around this is to always
create the mount from a non-elevated command prompt.
.PP
To make mapped drives available to the user account that created them
regardless if elevated or not, there is a special Windows setting called
linked
connections (https://docs.microsoft.com/en-us/troubleshoot/windows-client/networking/mapped-drives-not-available-from-elevated-command#detail-to-configure-the-enablelinkedconnections-registry-entry)
that can be enabled.
.PP
It is also possible to make a drive mount available to everyone on the
system, by running the process creating it as the built-in SYSTEM
account.
There are several ways to do this: One is to use the command-line
utility
PsExec (https://docs.microsoft.com/en-us/sysinternals/downloads/psexec),
from Microsoft\[aq]s Sysinternals suite, which has option \f[V]-s\f[R]
to start processes as the SYSTEM account.
Another alternative is to run the mount command from a Windows Scheduled
Task, or a Windows Service, configured to run as the SYSTEM account.
A third alternative is to use the WinFsp.Launcher
infrastructure (https://github.com/winfsp/winfsp/wiki/WinFsp-Service-Architecture)).
Read more in the install documentation (https://rclone.org/install/).
Note that when running rclone as another user, it will not use the
configuration file from your profile unless you tell it to with the
\f[V]--config\f[R] (https://rclone.org/docs/#config-string) option.
Note also that it is now the SYSTEM account that will have the owner
permissions, and other accounts will have permissions according to the
group or others scopes.
As mentioned above, these will then not get the \[dq]write extended
attributes\[dq] permission, and this may prevent writing to files.
You can work around this with the FileSecurity option, see example
above.
.PP
Note that mapping to a directory path, instead of a drive letter, does
not suffer from the same limitations.
.SS Mounting on macOS
.PP
Mounting on macOS can be done either via built-in NFS
server (https://rclone.org/commands/rclone_serve_nfs/),
macFUSE (https://osxfuse.github.io/) (also known as osxfuse) or
FUSE-T (https://www.fuse-t.org/).
macFUSE is a traditional FUSE driver utilizing a macOS kernel extension
(kext).
FUSE-T is an alternative FUSE system which \[dq]mounts\[dq] via an NFSv4
local server.
.SS Unicode Normalization
.PP
It is highly recommended to keep the default of
\f[V]--no-unicode-normalization=false\f[R] for all \f[V]mount\f[R] and
\f[V]serve\f[R] commands on macOS.
For details, see
vfs-case-sensitivity (https://rclone.org/commands/rclone_mount/#vfs-case-sensitivity).
.SS NFS mount
.PP
For macOS (and other platforms where this path is supported), prefer the
dedicated rclone nfsmount (https://rclone.org/commands/rclone_nfsmount/)
command.
It starts the NFS server and performs the mount for you.
\f[V]rclone mount\f[R] itself still uses FUSE (macFUSE/FUSE-T) and does
not switch to NFS via a flag.
.PP
This method spins up an NFS server using serve
nfs (https://rclone.org/commands/rclone_serve_nfs/) command and mounts
it to the specified mountpoint.
If you run this in background mode using |--daemon|, you will need to
send SIGTERM signal to the rclone process using |kill| command to stop
the mount.
.PP
Note that \f[V]--nfs-cache-handle-limit\f[R] controls the maximum number
of cached file handles stored by the \f[V]nfsmount\f[R] caching handler.
This should not be set too low or you may experience errors when trying
to access files.
The default is 1000000, but consider lowering this limit if the
server\[aq]s system resource usage causes problems.
.SS macFUSE Notes
.PP
If installing macFUSE using dmg
packages (https://github.com/osxfuse/osxfuse/releases) from the website,
rclone will locate the macFUSE libraries without any further
intervention.
If however, macFUSE is installed using the
macports (https://www.macports.org/) package manager, the following
addition steps are required.
.IP
.nf
\f[C]
sudo mkdir /usr/local/lib
cd /usr/local/lib
sudo ln -s /opt/local/lib/libfuse.2.dylib
\f[R]
.fi
.SS FUSE-T Limitations, Caveats, and Notes
.PP
There are some limitations, caveats, and notes about how it works.
These are current as of FUSE-T version 1.0.14.
.SS ModTime update on read
.PP
As per the FUSE-T
wiki (https://github.com/macos-fuse-t/fuse-t/wiki#caveats):
.RS
.PP
File access and modification times cannot be set separately as it seems
to be an issue with the NFS client which always modifies both.
Can be reproduced with \f[V]touch -m\f[R] and \f[V]touch -a\f[R]
commands
.RE
.PP
This means that viewing files with various tools, notably macOS Finder,
will cause rlcone to update the modification time of the file.
This may make rclone upload a full new copy of the file.
.SS Read Only mounts
.PP
When mounting with \f[V]--read-only\f[R], attempts to write to files
will fail \f[I]silently\f[R] as opposed to with a clear warning as in
macFUSE.
.SS Mounting on Linux
.PP
On newer versions of Ubuntu, you may encounter the following error when
running \f[V]rclone mount\f[R]:
.RS
.PP
NOTICE: mount helper error: fusermount3: mount failed: Permission denied
CRITICAL: Fatal error: failed to mount FUSE fs: fusermount: exit status
1
.RE
.PP
This may be due to newer Apparmor (https://wiki.ubuntu.com/AppArmor)
restrictions, which can be disabled with
\f[V]sudo aa-disable /usr/bin/fusermount3\f[R] (you may need to
\f[V]sudo apt install apparmor-utils\f[R] beforehand).
.SS Mounting on OpenBSD
.PP
\f[V]rclone nfsmount\f[R] works on OpenBSD by spinning up the serve
nfs (https://rclone.org/commands/rclone_serve_nfs/) server and mounting
it with the system \f[V]mount_nfs(8)\f[R], the same approach used for
the NFS mount method on macOS.
There is no FUSE-based mount option on OpenBSD, so \f[V]nfsmount\f[R] is
the only way to mount rclone remotes as a local file system there.
.SS portmap registration
.PP
OpenBSD\[aq]s kernel NFS client locates \f[V]mountd\f[R] through the
system portmapper rather than connecting to a fixed port, so
rclone\[aq]s in-process NFS server needs to be registered with portmap
before it can be mounted.
Start the \f[V]serve nfs\f[R] server on a fixed port, stop the system
NFS services so they don\[aq]t conflict with it, then register that port
with portmap for both the \f[V]nfs\f[R] and \f[V]mountd\f[R] RPC
programs (this is the recipe from hjicks in
#8578 (https://github.com/rclone/rclone/issues/8578#issuecomment-2799229652)):
.IP
.nf
\f[C]
rclone serve nfs --addr localhost:<PORT> remote:path
doas rcctl stop nfsd portmap
doas pkill -9 mountd # mountd can\[aq]t be stopped via rcctl(8)
doas rcctl -f start portmap
doas rpcinfo -s nfs 3 <PORT>
doas rpcinfo -s mountd 3 <PORT>
\f[R]
.fi
.PP
Replace \f[V]<PORT>\f[R] with the port passed to \f[V]--addr\f[R].
Port 2049 works too, but needs either running rclone as root or
adjusting \f[V]sysctl(8)\f[R] at securelevel 0, so a non-privileged port
is simpler for testing.
.SS Use \f[V]mount_nfs -T\f[R], not \f[V]mount\f[R]
.PP
Mount the exported NFS share directly with \f[V]mount_nfs(8)\f[R] using
the \f[V]-T\f[R] flag to force TCP, rather than the generic
\f[V]mount(8)\f[R] wrapper - OpenBSD\[aq]s \f[V]mount(8)\f[R] does not
understand \f[V]-T\f[R] and rejects it with
\f[V]unknown option -- T\f[R]:
.IP
.nf
\f[C]
mount_nfs -T localhost:/ /path/to/local/mount
\f[R]
.fi
.PP
\f[V]rclone nfsmount\f[R] does this for you automatically on OpenBSD (it
calls \f[V]mount_nfs\f[R] directly with \f[V]-T\f[R] instead of going
through \f[V]mount\f[R]), so this is only needed if you are mounting the
\f[V]serve nfs\f[R] export by hand.
.SS AUTH_UNIX and existing limitations
.PP
OpenBSD\[aq]s (and the other BSDs\[aq]) kernel NFS client requires the
server to offer the \f[V]AUTH_UNIX\f[R] authentication flavor during the
MOUNT RPC handshake; a server that only offers \f[V]AUTH_NULL\f[R] is
rejected with
\f[V]mount_nfs: can\[aq]t access /: Authentication error\f[R].
rclone\[aq]s NFS server advertises \f[V]AUTH_UNIX\f[R] for this reason,
though it does not implement any per-user access control on top of it -
see issue #8578 (https://github.com/rclone/rclone/issues/8578) for the
background on this and for the current state of OpenBSD support.
.SS Limitations
.PP
Without the use of \f[V]--vfs-cache-mode\f[R] this can only write files
sequentially, it can only seek when reading.
This means that many applications won\[aq]t work with their files on an
rclone mount without \f[V]--vfs-cache-mode writes\f[R] or
\f[V]--vfs-cache-mode full\f[R].
See the VFS File Caching section for more info.
When using NFS mount on macOS, if you don\[aq]t specify
|--vfs-cache-mode| the mount point will be read-only.
.PP
Bucket-based remotes - Azure Blob, Swift, S3, Google Cloud Storage and
B2 - can\[aq]t store empty directories.
Of these, only Azure Blob, Google Cloud Storage and S3 can preserve them
when you add \f[V]--xxx-directory_markers\f[R]; otherwise, empty
directories will vanish once they drop out of the directory cache.
.PP
When \f[V]rclone mount\f[R] is invoked on Unix with \f[V]--daemon\f[R]
flag, the main rclone program will wait for the background mount to
become ready or until the timeout specified by the
\f[V]--daemon-wait\f[R] flag.
On Linux it can check mount status using ProcFS so the flag in fact sets
\f[B]maximum\f[R] time to wait, while the real wait can be less.
On macOS / BSD the time to wait is constant and the check is performed
only at the end.
We advise you to set wait time on macOS reasonably.
.PP
Only supported on Linux, FreeBSD, OS X and Windows at the moment.
.SS rclone mount vs rclone sync/copy
.PP
File systems expect things to be 100% reliable, whereas cloud storage
systems are a long way from 100% reliable.
The rclone sync/copy commands cope with this with lots of retries.
However rclone mount can\[aq]t use retries in the same way without
making local copies of the uploads.
Look at the VFS File Caching for solutions to make mount more reliable.
.SS Attribute caching
.PP
You can use the flag \f[V]--attr-timeout\f[R] to set the time the kernel
caches the attributes (size, modification time, etc.)
for directory entries.
.PP
The default is \f[V]1s\f[R] which caches files just long enough to avoid
too many callbacks to rclone from the kernel.
.PP
In theory 0s should be the correct value for filesystems which can
change outside the control of the kernel.
However this causes quite a few problems such as rclone using too much
memory (https://github.com/rclone/rclone/issues/2157), rclone not
serving files to
samba (https://forum.rclone.org/t/rclone-1-39-vs-1-40-mount-issue/5112)
and excessive time listing
directories (https://github.com/rclone/rclone/issues/2095#issuecomment-371141147).
.PP
The kernel can cache the info about a file for the time given by
\f[V]--attr-timeout\f[R].
You may see corruption if the remote file changes length during this
window.
It will show up as either a truncated file or a file with garbage on the
end.
With \f[V]--attr-timeout 1s\f[R] this is very unlikely but not
impossible.
The higher you set \f[V]--attr-timeout\f[R] the more likely it is.
The default setting of \[dq]1s\[dq] is the lowest setting which
mitigates the problems above.
.PP
If you set it higher (\f[V]10s\f[R] or \f[V]1m\f[R] say) then the kernel
will call back to rclone less often making it more efficient, however
there is more chance of the corruption issue above.
.PP
If files don\[aq]t change on the remote outside of the control of rclone
then there is no chance of corruption.
.PP
This is the same as setting the attr_timeout option in mount.fuse.
.SS Filters
.PP
Note that all the rclone filters can be used to select a subset of the
files to be visible in the mount.
.SS systemd
.PP
When running rclone mount as a systemd service, it is possible to use
Type=notify.
In this case the service will enter the started state after the
mountpoint has been successfully set up.
Units having the rclone mount service specified as a requirement will
see all files and folders immediately in this mode.
.PP
Note that systemd runs mount units without any environment variables
including \f[V]PATH\f[R] or \f[V]HOME\f[R].
This means that tilde (\f[V]\[ti]\f[R]) expansion will not work and you
should provide \f[V]--config\f[R] and \f[V]--cache-dir\f[R] explicitly
as absolute paths via rclone arguments.
Since mounting requires the \f[V]fusermount\f[R] or
\f[V]fusermount3\f[R] program, rclone will use the fallback PATH of
\f[V]/bin:/usr/bin\f[R] in this scenario.
Please ensure that \f[V]fusermount\f[R]/\f[V]fusermount3\f[R] is present
on this PATH.
.SS Rclone as Unix mount helper
.PP
The core Unix program \f[V]/bin/mount\f[R] normally takes the
\f[V]-t FSTYPE\f[R] argument then runs the \f[V]/sbin/mount.FSTYPE\f[R]
helper program passing it mount options as \f[V]-o key=val,...\f[R] or
\f[V]--opt=...\f[R].
Automount (classic or systemd) behaves in a similar way.
.PP
rclone by default expects GNU-style flags \f[V]--key val\f[R].
To run it as a mount helper you should symlink rclone binary to
\f[V]/sbin/mount.rclone\f[R] and optionally \f[V]/usr/bin/rclonefs\f[R],
e.g.
\f[V]ln -s /usr/bin/rclone /sbin/mount.rclone\f[R].
rclone will detect it and translate command-line arguments
appropriately.
.PP
Now you can run classic mounts like this:
.IP
.nf
\f[C]
mount sftp1:subdir /mnt/data -t rclone -o vfs_cache_mode=writes,sftp_key_file=/path/to/pem
\f[R]
.fi
.PP
or create systemd mount units:
.IP
.nf
\f[C]
# /etc/systemd/system/mnt-data.mount
[Unit]
Description=Mount for /mnt/data
[Mount]
Type=rclone
What=sftp1:subdir
Where=/mnt/data
Options=rw,_netdev,allow_other,args2env,vfs-cache-mode=writes,config=/etc/rclone.conf,cache-dir=/var/rclone
\f[R]
.fi
.PP
optionally accompanied by systemd automount unit
.IP
.nf
\f[C]
# /etc/systemd/system/mnt-data.automount
[Unit]
Description=AutoMount for /mnt/data
[Automount]
Where=/mnt/data
TimeoutIdleSec=600
[Install]
WantedBy=multi-user.target
\f[R]
.fi
.PP
or add in \f[V]/etc/fstab\f[R] a line like
.IP
.nf
\f[C]
sftp1:subdir /mnt/data rclone rw,noauto,nofail,_netdev,x-systemd.automount,args2env,vfs_cache_mode=writes,config=/etc/rclone.conf,cache_dir=/var/cache/rclone 0 0
\f[R]
.fi
.PP
or use classic Automountd.
Remember to provide explicit \f[V]config=...,cache-dir=...\f[R] as a
workaround for mount units being run without \f[V]HOME\f[R].
.PP
Rclone in the mount helper mode will split \f[V]-o\f[R] argument(s) by
comma, replace \f[V]_\f[R] by \f[V]-\f[R] and prepend \f[V]--\f[R] to
get the command-line flags.
Options containing commas or spaces can be wrapped in single or double
quotes.
Any inner quotes inside outer quotes of the same type should be doubled.
.PP
Mount option syntax includes a few extra options treated specially:
.IP \[bu] 2
\f[V]env.NAME=VALUE\f[R] will set an environment variable for the mount
process.
This helps with Automountd and Systemd.mount which don\[aq]t allow
setting custom environment for mount helpers.
Typically you will use \f[V]env.HTTPS_PROXY=proxy.host:3128\f[R] or
\f[V]env.HOME=/root\f[R]
.IP \[bu] 2
\f[V]command=cmount\f[R] can be used to run \f[V]cmount\f[R] or any
other rclone command rather than the default \f[V]mount\f[R].
.IP \[bu] 2
\f[V]args2env\f[R] will pass mount options to the mount helper running
in background via environment variables instead of command line
arguments.
This allows to hide secrets from such commands as \f[V]ps\f[R] or
\f[V]pgrep\f[R].
.IP \[bu] 2
\f[V]vv...\f[R] will be transformed into appropriate
\f[V]--verbose=N\f[R]
.IP \[bu] 2
standard mount options like \f[V]x-systemd.automount\f[R],
\f[V]_netdev\f[R], \f[V]nosuid\f[R] and alike are intended only for
Automountd and ignored by rclone.
.SS VFS - Virtual File System
.PP
This command uses the VFS layer.
This adapts the cloud storage objects that rclone uses into something
which looks much more like a disk filing system.
.PP
Cloud storage objects have lots of properties which aren\[aq]t like disk
files - you can\[aq]t extend them or write to the middle of them, so the
VFS layer has to deal with that.
Because there is no one right way of doing this there are various
options explained below.
.PP
The VFS layer also implements a directory cache - this caches info about
files and directories (but not the data) in memory.
.SS VFS Directory Cache
.PP
Using the \f[V]--dir-cache-time\f[R] flag, you can control how long a
directory should be considered up to date and not refreshed from the
backend.
Changes made through the VFS will appear immediately or invalidate the
cache.
.IP
.nf
\f[C]
--dir-cache-time duration Time to cache directory entries for (default 5m0s)
--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)
\f[R]
.fi
.PP
However, changes made directly on the cloud storage by the web interface
or a different copy of rclone will only be picked up once the directory
cache expires if the backend configured does not support polling for
changes.
If the backend supports polling, changes will be picked up within the
polling interval.
.PP
You can send a \f[V]SIGHUP\f[R] signal to rclone for it to flush all
directory caches, regardless of how old they are.
Assuming only one rclone instance is running, you can reset the cache
like this:
.IP
.nf
\f[C]
kill -SIGHUP $(pidof rclone)
\f[R]
.fi
.PP
If you configure rclone with a remote control then you can use rclone rc
to flush the whole directory cache:
.IP
.nf
\f[C]
rclone rc vfs/forget
\f[R]
.fi
.PP
Or individual files or directories:
.IP
.nf
\f[C]
rclone rc vfs/forget file=path/to/file dir=path/to/dir
\f[R]
.fi
.SS VFS File Buffering
.PP
The \f[V]--buffer-size\f[R] flag determines the amount of memory, that
will be used to buffer data in advance.
.PP
Each open file will try to keep the specified amount of data in memory
at all times.
The buffered data is bound to one open file and won\[aq]t be shared.
.PP
This flag is a upper limit for the used memory per open file.
The buffer will only use memory for data that is downloaded but not yet
read.
If the buffer is empty, only a small amount of memory will be used.
.PP
The maximum memory used by rclone for buffering can be up to
\f[V]--buffer-size * open files\f[R].
.SS VFS File Caching
.PP
These flags control the VFS file caching options.
File caching is necessary to make the VFS layer appear compatible with a
normal file system.
It can be disabled at the cost of some compatibility.
.PP
For example you\[aq]ll need to enable VFS caching if you want to read
and write simultaneously to a file.
See below for more details.
.PP
Note that the VFS cache is separate from the cache backend and you may
find that you need one or the other or both.
.IP
.nf
\f[C]
--cache-dir string Directory rclone will use for caching.
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
\f[R]
.fi
.PP
If run with \f[V]-vv\f[R] rclone will print the location of the file
cache.
The files are stored in the user cache file area which is OS dependent
but can be controlled with \f[V]--cache-dir\f[R] or setting the
appropriate environment variable.
.PP
The cache has 4 different modes selected by \f[V]--vfs-cache-mode\f[R].
The higher the cache mode the more compatible rclone becomes at the cost
of using disk space.
.PP
Note that files are written back to the remote only when they are closed
and if they haven\[aq]t been accessed for \f[V]--vfs-write-back\f[R]
seconds.
If rclone is quit or dies with files that haven\[aq]t been uploaded,
these will be uploaded next time rclone is run with the same flags.
.PP
If using \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] note that the cache may exceed
these quotas for two reasons.
Firstly because it is only checked every
\f[V]--vfs-cache-poll-interval\f[R].
Secondly because open files cannot be evicted from the cache.
When \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] is exceeded, rclone will attempt to
evict the least accessed files from the cache first.
rclone will start with files that haven\[aq]t been accessed for the
longest.
This cache flushing strategy is efficient and more relevant files are
likely to remain cached.
.PP
The \f[V]--vfs-cache-max-age\f[R] will evict files from the cache after
the set time since last access has passed; it is based on access time,
not on when the file was first added to the cache.
The default value of 1 hour will start evicting files from cache that
haven\[aq]t been accessed for 1 hour.
When a cached file is accessed the 1 hour timer is reset to 0 and will
wait for 1 more hour before evicting.
Specify the time with standard notation, s, m, h, d, w .
.PP
You \f[B]should not\f[R] run two copies of rclone using the same VFS
cache with the same or overlapping remotes if using
\f[V]--vfs-cache-mode > off\f[R].
This can potentially cause data corruption if you do.
You can work around this by giving each rclone its own cache hierarchy
with \f[V]--cache-dir\f[R].
You don\[aq]t need to worry about this if the remotes in use don\[aq]t
overlap.
.SS --vfs-cache-mode off
.PP
In this mode (the default) the cache will read directly from the remote
and write directly to the remote without caching anything on disk.
.PP
This will mean some operations are not possible
.IP \[bu] 2
Files can\[aq]t be opened for both read AND write
.IP \[bu] 2
Files opened for write can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files open for read with O_TRUNC will be opened write only
.IP \[bu] 2
Files open for write only will behave as if O_TRUNC was supplied
.IP \[bu] 2
Open modes O_APPEND, O_TRUNC are ignored
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode minimal
.PP
This is very similar to \[dq]off\[dq] except that files opened for read
AND write will be buffered to disk.
This means that files opened for write will be a lot more compatible,
but uses the minimal disk space.
.PP
These operations are not possible
.IP \[bu] 2
Files opened for write only can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files opened for write only will ignore O_APPEND, O_TRUNC
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode writes
.PP
In this mode files opened for read only are still read directly from the
remote, write only and read/write files are buffered to disk first.
.PP
This mode should support all normal file system operations.
.PP
If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.
.SS --vfs-cache-mode full
.PP
In this mode all reads and writes are buffered to and from disk.
When data is read from the remote this is buffered to disk as well.
.PP
In this mode the files in the cache will be sparse files and rclone will
keep track of which bits of the files it has downloaded.
.PP
So if an application only reads the starts of each file, then rclone
will only buffer the start of the file.
These files will appear to be their full size in the cache, but they
will be sparse files with only the data that has been downloaded present
in them.
.PP
This mode should support all normal file system operations and is
otherwise identical to \f[V]--vfs-cache-mode\f[R] writes.
.PP
When reading a file rclone will read \f[V]--buffer-size\f[R] plus
\f[V]--vfs-read-ahead\f[R] bytes ahead.
The \f[V]--buffer-size\f[R] is buffered in memory whereas the
\f[V]--vfs-read-ahead\f[R] is buffered on disk.
.PP
When using this mode it is recommended that \f[V]--buffer-size\f[R] is
not set too large and \f[V]--vfs-read-ahead\f[R] is set large if
required.
.PP
\f[B]IMPORTANT\f[R] not all file systems support sparse files.
In particular FAT/exFAT do not.
Rclone will perform very badly if the cache directory is on a filesystem
which doesn\[aq]t support sparse files and it will log an ERROR message
if one is detected.
.SS Fingerprinting
.PP
Various parts of the VFS use fingerprinting to see if a local file copy
has changed relative to a remote file.
Fingerprints are made from:
.IP \[bu] 2
size
.IP \[bu] 2
modification time
.IP \[bu] 2
hash
.PP
where available on an object.
.PP
On some backends some of these attributes are slow to read (they take an
extra API call per object, or extra work per object).
.PP
For example \f[V]hash\f[R] is slow with the \f[V]local\f[R] and
\f[V]sftp\f[R] backends as they have to read the entire file and hash
it, and \f[V]modtime\f[R] is slow with the \f[V]s3\f[R],
\f[V]swift\f[R], \f[V]ftp\f[R] and \f[V]qinqstor\f[R] backends because
they need to do an extra API call to fetch it.
.PP
If you use the \f[V]--vfs-fast-fingerprint\f[R] flag then rclone will
not include the slow operations in the fingerprint.
This makes the fingerprinting less accurate but much faster and will
improve the opening time of cached files.
.PP
If you are running a vfs cache over \f[V]local\f[R], \f[V]s3\f[R] or
\f[V]swift\f[R] backends then using this flag is recommended.
.PP
Note that if you change the value of this flag, the fingerprints of the
files in the cache may be invalidated and the files will need to be
downloaded again.
.SS VFS Chunked Reading
.PP
When rclone reads files from a remote it reads them in chunks.
This means that rather than requesting the whole file rclone reads the
chunk specified.
This can reduce the used download quota for some remotes by requesting
only chunks from the remote that are actually read, at the cost of an
increased number of requests.
.PP
These flags control the chunking:
.IP
.nf
\f[C]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
--vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
\f[R]
.fi
.PP
The chunking behaves differently depending on the
\f[V]--vfs-read-chunk-streams\f[R] parameter.
.SS \f[V]--vfs-read-chunk-streams\f[R] == 0
.PP
Rclone will start reading a chunk of size
\f[V]--vfs-read-chunk-size\f[R], and then double the size for each read.
When \f[V]--vfs-read-chunk-size-limit\f[R] is specified, and greater
than \f[V]--vfs-read-chunk-size\f[R], the chunk size for each open file
will get doubled only until the specified value is reached.
If the value is \[dq]off\[dq], which is the default, the limit is
disabled and the chunk size will grow indefinitely.
.PP
With \f[V]--vfs-read-chunk-size 100M\f[R] and
\f[V]--vfs-read-chunk-size-limit 0\f[R] the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on.
When \f[V]--vfs-read-chunk-size-limit 500M\f[R] is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.
.PP
Setting \f[V]--vfs-read-chunk-size\f[R] to \f[V]0\f[R] or \[dq]off\[dq]
disables chunked reading.
.PP
The chunks will not be buffered in memory.
.SS \f[V]--vfs-read-chunk-streams\f[R] > 0
.PP
Rclone reads \f[V]--vfs-read-chunk-streams\f[R] chunks of size
\f[V]--vfs-read-chunk-size\f[R] concurrently.
The size for each read will stay constant.
.PP
This improves performance massively on high latency links or very high
bandwidth links to high performance object stores.
.PP
Some experimentation will be needed to find the optimum values of
\f[V]--vfs-read-chunk-size\f[R] and \f[V]--vfs-read-chunk-streams\f[R]
as these will depend on the backend in use and the latency to the
backend.
.PP
For high performance object stores (eg AWS S3) a reasonable place to
start might be \f[V]--vfs-read-chunk-streams 16\f[R] and
\f[V]--vfs-read-chunk-size 4M\f[R].
In testing with AWS S3 the performance scaled roughly as the
\f[V]--vfs-read-chunk-streams\f[R] setting.
.PP
Similar settings should work for high latency links, but depending on
the latency they may need more \f[V]--vfs-read-chunk-streams\f[R] in
order to get the throughput.
.SS VFS Performance
.PP
These flags may be used to enable/disable features of the VFS for
performance or other reasons.
See also the chunked reading feature.
.PP
In particular S3 and Swift benefit hugely from the
\f[V]--no-modtime\f[R] flag (or use \f[V]--use-server-modtime\f[R] for a
slightly different effect) as each read of the modification time takes a
transaction.
.IP
.nf
\f[C]
--no-checksum Don\[aq]t compare checksums on up/download.
--no-modtime Don\[aq]t read/write the modification time (can speed things up).
--no-seek Don\[aq]t allow seeking in files.
--read-only Only allow read-only access.
\f[R]
.fi
.PP
Sometimes rclone is delivered reads or writes out of order.
Rather than seeking rclone will wait a short time for the in sequence
read or write to come in.
These flags only come into effect when not using an on disk cache file.
.IP
.nf
\f[C]
--vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
When using VFS write caching (\f[V]--vfs-cache-mode\f[R] with value
writes or full), the global flag \f[V]--transfers\f[R] can be set to
adjust the number of parallel uploads of modified files from the cache
(the related global flag \f[V]--checkers\f[R] has no effect on the VFS).
.IP
.nf
\f[C]
--transfers int Number of file transfers to run in parallel (default 4)
\f[R]
.fi
.SS Symlinks
.PP
By default the VFS does not support symlinks.
However this may be enabled with either of the following flags:
.IP
.nf
\f[C]
--links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension.
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
\f[R]
.fi
.PP
As most cloud storage systems do not support symlinks directly, rclone
stores the symlink as a normal file with a special extension.
So a file which appears as a symlink \f[V]link-to-file.txt\f[R] would be
stored on cloud storage as \f[V]link-to-file.txt.rclonelink\f[R] and the
contents would be the path to the symlink destination.
.PP
Note that \f[V]--links\f[R] enables symlink translation globally in
rclone - this includes any backend which supports the concept (for
example the local backend).
\f[V]--vfs-links\f[R] just enables it for the VFS layer.
.PP
This scheme is compatible with that used by the local backend with the
--local-links flag (https://rclone.org/local/#symlinks-junction-points).
.PP
The \f[V]--vfs-links\f[R] flag has been designed for
\f[V]rclone mount\f[R], \f[V]rclone nfsmount\f[R] and
\f[V]rclone serve nfs\f[R].
.PP
It hasn\[aq]t been tested with the other \f[V]rclone serve\f[R] commands
yet.
.PP
A limitation of the current implementation is that it expects the caller
to resolve sub-symlinks.
For example given this directory tree
.IP
.nf
\f[C]
\&.
├── dir
│\ \ └── file.txt
└── linked-dir -> dir
\f[R]
.fi
.PP
The VFS will correctly resolve \f[V]linked-dir\f[R] but not
\f[V]linked-dir/file.txt\f[R].
This is not a problem for the tested commands but may be for other
commands.
.PP
\f[B]Note\f[R] that there is an outstanding issue with symlink support
issue #8245 (https://github.com/rclone/rclone/issues/8245) with
duplicate files being created when symlinks are moved into directories
where there is a file of the same name (or vice versa).
.SS VFS Case Sensitivity
.PP
Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.
.PP
File systems in modern Windows are case-insensitive but case-preserving:
although existing files can be opened using any case, the exact case
used to create the file is preserved and available for programs to
query.
It is not allowed for two files in the same directory to differ only by
case.
.PP
Usually file systems on macOS are case-insensitive.
It is possible to make macOS file systems case-sensitive but that is not
the default.
.PP
The \f[V]--vfs-case-insensitive\f[R] VFS flag controls how rclone
handles these two cases.
If its value is \[dq]false\[dq], rclone passes file names to the remote
as-is.
If the flag is \[dq]true\[dq] (or appears without a value on the command
line), rclone may perform a \[dq]fixup\[dq] as explained below.
.PP
The user may specify a file name to open/delete/rename/etc with a case
different than what is stored on the remote.
If an argument refers to an existing file with exactly the same name,
then the case of the existing file on the disk will be used.
However, if a file name with exactly the same name is not found but a
name differing only by case exists, rclone will transparently fixup the
name.
This fixup happens only when an existing file is requested.
Case sensitivity of file names created anew by rclone is controlled by
the underlying remote.
.PP
Note that case sensitivity of the operating system running rclone (the
target) may differ from case sensitivity of a file system presented by
rclone (the source).
The flag controls whether \[dq]fixup\[dq] is performed to satisfy the
target.
.PP
If the flag is not provided on the command line, then its default value
depends on the operating system where rclone runs: \[dq]true\[dq] on
Windows and macOS, \[dq]false\[dq] otherwise.
If the flag is provided without a value, then it is \[dq]true\[dq].
.PP
The \f[V]--no-unicode-normalization\f[R] flag controls whether a similar
\[dq]fixup\[dq] is performed for filenames that differ but are
canonically
equivalent (https://en.wikipedia.org/wiki/Unicode_equivalence) with
respect to unicode.
Unicode normalization can be particularly helpful for users of macOS,
which prefers form NFD instead of the NFC used by most other platforms.
It is therefore highly recommended to keep the default of
\f[V]false\f[R] on macOS, to avoid encoding compatibility issues.
.PP
In the (probably unlikely) event that a directory has multiple duplicate
filenames after applying case and unicode normalization, the
\f[V]--vfs-block-norm-dupes\f[R] flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory.
For this reason, it is recommended to leave this disabled if not needed.
However, macOS users may wish to consider using it, as otherwise, if a
remote directory contains both NFC and NFD versions of the same
filename, an odd situation will occur: both versions of the file will be
visible in the mount, and both will appear to be editable, however,
editing either version will actually result in only the NFD version
getting edited under the hood.
\f[V]--vfs-block- norm-dupes\f[R] prevents this confusion by detecting
this scenario, hiding the duplicates, and logging an error, similar to
how this is handled in \f[V]rclone sync\f[R].
.SS VFS Disk Options
.PP
This flag allows you to manually set the statistics about the filing
system.
It can be useful when those statistics cannot be read correctly
automatically.
.IP
.nf
\f[C]
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
\f[R]
.fi
.SS Alternate report of used bytes
.PP
Some backends, most notably S3, do not report the amount of bytes used.
If you need this information to be available when running \f[V]df\f[R]
on the filesystem, then pass the flag \f[V]--vfs-used-is-size\f[R] to
rclone.
With this flag set, instead of relying on the backend to report this
information, rclone will scan the whole remote similar to
\f[V]rclone size\f[R] and compute the total used space itself.
.PP
\f[B]WARNING\f[R]: Contrary to \f[V]rclone size\f[R], this flag ignores
filters so that the result is accurate.
However, this is very inefficient and may cost lots of API calls
resulting in extra charges.
Use it as a last resort and only with caching.
.SS VFS Metadata
.PP
If you use the \f[V]--vfs-metadata-extension\f[R] flag you can get the
VFS to expose files which contain the
metadata (https://rclone.org/docs/#metadata) as a JSON blob.
These files will not appear in the directory listing, but can be
\f[V]stat\f[R]-ed and opened and once they have been they \f[B]will\f[R]
appear in directory listings until the directory cache expires.
.PP
Note that some backends won\[aq]t create metadata unless you pass in the
\f[V]--metadata\f[R] flag.
.PP
For example, using \f[V]rclone mount\f[R] with
\f[V]--metadata --vfs-metadata-extension .metadata\f[R] we get
.IP
.nf
\f[C]
$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
$ cat /mnt/1G.metadata
{
\[dq]atime\[dq]: \[dq]2025-03-04T17:34:22.317069787Z\[dq],
\[dq]btime\[dq]: \[dq]2025-03-03T16:03:37.708253808Z\[dq],
\[dq]gid\[dq]: \[dq]1000\[dq],
\[dq]mode\[dq]: \[dq]100664\[dq],
\[dq]mtime\[dq]: \[dq]2025-03-03T16:03:39.640238323Z\[dq],
\[dq]uid\[dq]: \[dq]1000\[dq]
}
$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
-rw-rw-r-- 1 user user 185 Mar 3 16:03 1G.metadata
\f[R]
.fi
.PP
If the file has no metadata it will be returned as \f[V]{}\f[R] and if
there is an error reading the metadata the error will be returned as
\f[V]{\[dq]error\[dq]:\[dq]error string\[dq]}\f[R].
.IP
.nf
\f[C]
rclone mount remote:path /path/to/mountpoint [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--allow-idmap Allow id-mapped mounts (Linux 6.12+, mount2 only)
--allow-non-empty Allow mounting over a non-empty directory (not supported on Windows)
--allow-other Allow access to other users (not supported on Windows)
--allow-root Allow access to root user (not supported on Windows)
--async-read Use asynchronous reads (not supported on Windows) (default true)
--attr-timeout Duration Time for which file/directory attributes are cached (default 1s)
--daemon Run mount in background and exit parent process (as background output is suppressed, use --log-file with --log-format=pid,... to monitor) (not supported on Windows)
--daemon-timeout Duration Time limit for rclone to respond to kernel (not supported on Windows) (default 0s)
--daemon-wait Duration Time to wait for ready mount from daemon (maximum time on Linux, constant sleep time on OSX/BSD) (not supported on Windows) (default 1m0s)
--debug-fuse Debug the FUSE internals - needs -v
--default-permissions Makes kernel enforce access control based on the file mode (not supported on Windows)
--devname string Set the device name - default is remote:path
--dir-cache-time Duration Time to cache directory entries for (default 5m0s)
--dir-perms FileMode Directory permissions (default 777)
--direct-io Use Direct IO, disables caching of data
--file-perms FileMode File permissions (default 666)
--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 (not supported on Windows) (default 1000)
-h, --help help for mount
--link-perms FileMode Link permissions (default 666)
--max-read-ahead SizeSuffix The number of bytes that can be prefetched for sequential reads (not supported on Windows) (default 128Ki)
--mount-case-insensitive Tristate Tell the OS the mount is case insensitive (true) or sensitive (false) regardless of the backend (auto) (default unset)
--network-mode Mount as remote network drive, instead of fixed disk drive (supported on Windows only)
--no-checksum Don\[aq]t compare checksums on up/download
--no-modtime Don\[aq]t read/write the modification time (can speed things up)
--no-seek Don\[aq]t allow seeking in files
--noappledouble Ignore Apple Double (._) and .DS_Store files (supported on OSX only) (default true)
--noapplexattr Ignore all \[dq]com.apple.*\[dq] extended attributes (supported on OSX only)
-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 and only on supported remotes (set 0 to disable) (default 1m0s)
--read-only Only allow read-only access
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask FileMode Override the permission bits set by the filesystem (not supported on Windows) (default 002)
--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)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-case-insensitive If a file name not found, find a case insensitive match
--vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
--vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
--vfs-handle-caching Duration Time to keep file handle and downloaders alive after last close (default 5s)
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
--vfs-metadata-extension string Set the extension to read metadata from
--vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--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 (\[aq]off\[aq] is unlimited) (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
--volname string Set the volume name (supported on Windows and OSX only)
--write-back-cache Makes kernel buffer writes before sending them to rclone (without this, writethrough caching is used) (not supported on Windows)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone moveto
.PP
Move file or directory from source to dest.
.SS Synopsis
.PP
If source:path is a file or directory then it moves it to a file or
directory named dest:path.
.PP
This can be used to rename files or upload single files to other than
their existing name.
If the source is a directory then it acts exactly like the
move (https://rclone.org/commands/rclone_move/) command.
.PP
So
.IP
.nf
\f[C]
rclone moveto src dst
\f[R]
.fi
.PP
where src and dst are rclone paths, either remote:path or /path/to/local
or C:.
.PP
This will:
.IP
.nf
\f[C]
if src is file
move it to dst, overwriting an existing file if it exists
if src is directory
move it to dst, overwriting existing files if they exist
see move command for full details
\f[R]
.fi
.PP
This doesn\[aq]t transfer files that are identical on src and dst,
testing by size and modification time or MD5SUM.
src will be deleted on successful transfer.
.PP
\f[B]Important\f[R]: Since this can cause data loss, test first with the
\f[V]--dry-run\f[R] or the \f[V]--interactive\f[R]/\f[V]-i\f[R] flag.
.PP
\f[B]Note\f[R]: Use the \f[V]-P\f[R]/\f[V]--progress\f[R] flag to view
real-time transfer statistics.
.SS Logger Flags
.PP
The \f[V]--differ\f[R], \f[V]--missing-on-dst\f[R],
\f[V]--missing-on-src\f[R], \f[V]--match\f[R] and \f[V]--error\f[R]
flags write paths, one per line, to the file name (or stdout if it is
\f[V]-\f[R]) supplied.
What they write is described in the help below.
For example \f[V]--differ\f[R] will write all paths which are present on
both the source and destination but different.
.PP
The \f[V]--combined\f[R] flag will write a file (or stdout) which
contains all file paths with a symbol and then a space and then the path
to tell you what happened to it.
These are reminiscent of diff files.
.IP \[bu] 2
\f[V]= path\f[R] means path was found in source and destination and was
identical
.IP \[bu] 2
\f[V]- path\f[R] means path was missing on the source, so only in the
destination
.IP \[bu] 2
\f[V]+ path\f[R] means path was missing on the destination, so only in
the source
.IP \[bu] 2
\f[V]* path\f[R] means path was present in source and destination but
different.
.IP \[bu] 2
\f[V]! path\f[R] means there was an error reading or hashing the source
or dest.
.PP
The \f[V]--dest-after\f[R] flag writes a list file using the same format
flags as
\f[V]lsf\f[R] (https://rclone.org/commands/rclone_lsf/#synopsis)
(including customizable options for hash, modtime,
etc. (https://rclone.org/commands/rclone_lsf/#synopsis)) Conceptually it
is similar to rsync\[aq]s \f[V]--itemize-changes\f[R], but not identical
-- it should output an accurate list of what will be on the destination
after the command is finished.
.PP
When the \f[V]--no-traverse\f[R] flag is set, all logs involving files
that exist only on the destination will be incomplete or completely
missing.
.PP
Note that these logger flags have a few limitations, and certain
scenarios are not currently supported:
.IP \[bu] 2
\f[V]--max-duration\f[R] / \f[V]CutoffModeHard\f[R]
.IP \[bu] 2
\f[V]--compare-dest\f[R] / \f[V]--copy-dest\f[R]
.IP \[bu] 2
server-side moves of an entire dir at once
.IP \[bu] 2
High-level retries, because there would be duplicates (use
\f[V]--retries 1\f[R] to disable)
.IP \[bu] 2
Possibly some unusual error scenarios
.PP
Note also that each file is logged during execution, as opposed to
after, so it is most useful as a predictor of what SHOULD happen to each
file (which may or may not match what actually DID).
.IP
.nf
\f[C]
rclone moveto source:path dest:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--absolute Put a leading / in front of path names
--combined string Make a combined report of changes to this file
--csv Output in CSV format
--dest-after string Report all files that exist on the dest post-sync
--differ string Report all non-matching files to this file
-d, --dir-slash Append a slash to directory names (default true)
--dirs-only Only list directories
--error string Report all files with errors (hashing or reading) to this file
--files-only Only list files (default true)
-F, --format string Output format - see lsf help for details (default \[dq]p\[dq])
--hash h Use this hash when h is used in the format MD5|SHA-1|DropboxHash (default \[dq]md5\[dq])
-h, --help help for moveto
--match string Report all matching files to this file
--missing-on-dst string Report all files missing from the destination to this file
--missing-on-src string Report all files missing from the source to this file
-s, --separator string Separator for the items in the format (default \[dq];\[dq])
-t, --timeformat string Specify a custom time format - see docs for details (default: 2006-01-02 15:04:05)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Copy Options
.PP
Flags for anything which can copy a file
.IP
.nf
\f[C]
--check-first Do all the checks before starting transfers
-c, --checksum Check for changes with size & checksum (if available, or fallback to size only)
--compare-dest stringArray Include additional server-side paths during comparison
--copy-dest stringArray Implies --compare-dest but also copies files from paths into destination
--cutoff-mode HARD|SOFT|CAUTIOUS Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
--ignore-case-sync Ignore case when synchronizing
--ignore-checksum Skip post copy check of checksums
--ignore-existing Skip all files that exist on destination
--ignore-size Ignore size when skipping use modtime or checksum
-I, --ignore-times Don\[aq]t skip items that match size and time - transfer all unconditionally
--immutable Do not modify files, fail if existing files have been modified
--inplace Download directly to destination file instead of atomic download to temp/rename
-l, --links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension
--max-backlog int Maximum number of objects in sync or check backlog (default 10000)
--max-duration Duration Maximum duration rclone will transfer data for (default 0s)
--max-transfer SizeSuffix Maximum size of data to transfer (default off)
-M, --metadata If set, preserve metadata when copying objects
--modify-window Duration Max time diff to be considered the same (default 1ns)
--multi-thread-chunk-size SizeSuffix Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
--multi-thread-cutoff SizeSuffix Use multi-thread downloads for files above this size (default 256Mi)
--multi-thread-streams int Number of streams to use for multi-thread downloads (default 4)
--multi-thread-write-buffer-size SizeSuffix In memory buffer size for writing when in multi-thread mode (default 128Ki)
--name-transform stringArray Transform paths during the copy process
--no-check-dest Don\[aq]t check the destination, copy regardless
--no-traverse Don\[aq]t traverse destination file system on copy
--no-update-dir-modtime Don\[aq]t update directory modification times
--no-update-modtime Don\[aq]t update destination modtime if files identical
--order-by string Instructions on how to order the transfers, e.g. \[aq]size,descending\[aq]
--partial-suffix string Add partial-suffix to temporary file name when --inplace is not used (default \[dq].partial\[dq])
--refresh-times Refresh the modtime of remote files
--server-side-across-configs Allow server-side operations (e.g. copy) to work across different configs
--size-only Skip based on size only, not modtime or checksum
--streaming-upload-cutoff SizeSuffix Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
-u, --update Skip files that are newer on the destination
\f[R]
.fi
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone ncdu
.PP
Explore a remote with a text based user interface.
.SS Synopsis
.PP
This displays a text based user interface allowing the navigation of a
remote.
It is most useful for answering the question - \[dq]What is using all my
disk space?\[dq].
.PP
To make the user interface it first scans the entire remote given and
builds an in memory representation.
rclone ncdu can be used during this scanning phase and you will see it
building up the directory structure as it goes along.
.PP
You can interact with the user interface using key presses, press
\[aq]?\[aq] to toggle the help on and off.
The supported keys are:
.IP
.nf
\f[C]
↑,↓ or k,j to Move
→,l to enter
←,h to return
g toggle graph
c toggle counts
a toggle average size in directory
m toggle modified time
u toggle human-readable format
n,s,C,A,M sort by name,size,count,asize,mtime
d delete file/directory
v select file/directory
V enter visual select mode
D delete selected files/directories
y copy current path to clipboard
Y display current path
\[ha]L refresh screen (fix screen corruption)
r recalculate file sizes
? to toggle help on and off
ESC to close the menu box
q/\[ha]c to quit
\f[R]
.fi
.PP
Listed files/directories may be prefixed by a one-character flag, some
of them combined with a description in brackets at end of line.
These flags have the following meaning:
.IP
.nf
\f[C]
e means this is an empty directory, i.e. contains no files (but
may contain empty subdirectories)
\[ti] means this is a directory where some of the files (possibly in
subdirectories) have unknown size, and therefore the directory
size may be underestimated (and average size inaccurate, as it
is average of the files with known sizes).
\&. means an error occurred while reading a subdirectory, and
therefore the directory size may be underestimated (and average
size inaccurate)
! means an error occurred while reading this directory
\f[R]
.fi
.PP
This an homage to the ncdu tool (https://dev.yorhel.nl/ncdu) but for
rclone remotes.
It is missing lots of features at the moment but is useful as it stands.
Unlike ncdu it does not show excluded files.
.PP
Note that it might take some time to delete big files/directories.
The UI won\[aq]t respond in the meantime since the deletion is done
synchronously.
.PP
For a non-interactive listing of the remote, see the
tree (https://rclone.org/commands/rclone_tree/) command.
To just get the total size of the remote you can also use the
size (https://rclone.org/commands/rclone_size/) command.
.IP
.nf
\f[C]
rclone ncdu remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for ncdu
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone nfsmount
.PP
Mount the remote as file system on a mountpoint.
.SS Synopsis
.PP
Rclone nfsmount allows Linux, FreeBSD, macOS and Windows to mount any of
Rclone\[aq]s cloud storage systems as a file system with FUSE.
.PP
First set up your remote using \f[V]rclone config\f[R].
Check it works with \f[V]rclone ls\f[R] etc.
.PP
On Linux and macOS, you can run mount in either foreground or background
(aka daemon) mode.
Mount runs in foreground mode by default.
Use the \f[V]--daemon\f[R] flag to force background mode.
On Windows you can run mount in foreground only, the flag is ignored.
.PP
In background mode rclone acts as a generic Unix mount program: the main
program starts, spawns background rclone process to setup and maintain
the mount, waits until success or timeout and exits with appropriate
code (killing the child process if it fails).
.PP
On Linux/macOS/FreeBSD start the mount like this, where
\f[V]/path/to/local/mount\f[R] is an \f[B]empty\f[R] \f[B]existing\f[R]
directory:
.IP
.nf
\f[C]
rclone nfsmount remote:path/to/files /path/to/local/mount
\f[R]
.fi
.PP
On Windows you can start a mount in different ways.
See below for details.
If foreground mount is used interactively from a console window, rclone
will serve the mount and occupy the console so another window should be
used to work with the mount until rclone is interrupted e.g.
by pressing Ctrl-C.
.PP
The following examples will mount to an automatically assigned drive, to
specific drive letter \f[V]X:\f[R], to path
\f[V]C:\[rs]path\[rs]parent\[rs]mount\f[R] (where parent directory or
drive must exist, and mount must \f[B]not\f[R] exist, and is not
supported when mounting as a network drive), and the last example will
mount as network share \f[V]\[rs]\[rs]cloud\[rs]remote\f[R] and map it
to an automatically assigned drive:
.IP
.nf
\f[C]
rclone nfsmount remote:path/to/files *
rclone nfsmount remote:path/to/files X:
rclone nfsmount remote:path/to/files C:\[rs]path\[rs]parent\[rs]mount
rclone nfsmount remote:path/to/files \[rs]\[rs]cloud\[rs]remote
\f[R]
.fi
.PP
When the program ends while in foreground mode, either via Ctrl+C or
receiving a SIGINT or SIGTERM signal, the mount should be automatically
stopped.
.PP
When running in background mode the user will have to stop the mount
manually:
.IP
.nf
\f[C]
# Linux
fusermount -u /path/to/local/mount
#... or on some systems
fusermount3 -u /path/to/local/mount
# OS X or Linux when using nfsmount
umount /path/to/local/mount
\f[R]
.fi
.PP
The umount operation can fail, for example when the mountpoint is busy.
When that happens, it is the user\[aq]s responsibility to stop the mount
manually.
.PP
The size of the mounted file system will be set according to information
retrieved from the remote, the same as returned by the rclone
about (https://rclone.org/commands/rclone_about/) command.
Remotes with unlimited storage may report the used size only, then an
additional 1 PiB of free space is assumed.
If the remote does not
support (https://rclone.org/overview/#optional-features) the about
feature at all, then 1 PiB is set as both the total and the free size.
.SS Installing on Windows
.PP
To run \f[V]rclone nfsmount on Windows\f[R], you will need to download
and install WinFsp (https://winfsp.dev).
.PP
WinFsp (https://github.com/winfsp/winfsp) is an open-source Windows File
System Proxy which makes it easy to write user space file systems for
Windows.
It provides a FUSE emulation layer which rclone uses combination with
cgofuse (https://github.com/winfsp/cgofuse).
Both of these packages are by Bill Zissimopoulos who was very helpful
during the implementation of rclone nfsmount for Windows.
.SS Mounting modes on windows
.PP
Unlike other operating systems, Microsoft Windows provides a different
filesystem type for network and fixed drives.
It optimises access on the assumption fixed disk drives are fast and
reliable, while network drives have relatively high latency and less
reliability.
Some settings can also be differentiated between the two types, for
example that Windows Explorer should just display icons and not create
preview thumbnails for image and video files on network drives.
.PP
In most cases, rclone will mount the remote as a normal, fixed disk
drive by default.
However, you can also choose to mount it as a remote network drive,
often described as a network share.
If you mount an rclone remote using the default, fixed drive mode and
experience unexpected program errors, freezes or other issues, consider
mounting as a network drive instead.
.PP
When mounting as a fixed disk drive you can either mount to an unused
drive letter, or to a path representing a \f[B]nonexistent\f[R]
subdirectory of an \f[B]existing\f[R] parent directory or drive.
Using the special value \f[V]*\f[R] will tell rclone to automatically
assign the next available drive letter, starting with Z: and moving
backward.
Examples:
.IP
.nf
\f[C]
rclone nfsmount remote:path/to/files *
rclone nfsmount remote:path/to/files X:
rclone nfsmount remote:path/to/files C:\[rs]path\[rs]parent\[rs]mount
rclone nfsmount remote:path/to/files X:
\f[R]
.fi
.PP
Option \f[V]--volname\f[R] can be used to set a custom volume name for
the mounted file system.
The default is to use the remote name and path.
.PP
To mount as network drive, you can add option \f[V]--network-mode\f[R]
to your nfsmount command.
Mounting to a directory path is not supported in this mode, it is a
limitation Windows imposes on junctions, so the remote must always be
mounted to a drive letter.
.IP
.nf
\f[C]
rclone nfsmount remote:path/to/files X: --network-mode
\f[R]
.fi
.PP
A volume name specified with \f[V]--volname\f[R] will be used to create
the network share path.
A complete UNC path, such as \f[V]\[rs]\[rs]cloud\[rs]remote\f[R],
optionally with path
\f[V]\[rs]\[rs]cloud\[rs]remote\[rs]madeup\[rs]path\f[R], will be used
as is.
Any other string will be used as the share part, after a default prefix
\f[V]\[rs]\[rs]server\[rs]\f[R].
If no volume name is specified then \f[V]\[rs]\[rs]server\[rs]share\f[R]
will be used.
You must make sure the volume name is unique when you are mounting more
than one drive, or else the mount command will fail.
The share name will treated as the volume label for the mapped drive,
shown in Windows Explorer etc, while the complete
\f[V]\[rs]\[rs]server\[rs]share\f[R] will be reported as the remote UNC
path by \f[V]net use\f[R] etc, just like a normal network drive mapping.
.PP
If you specify a full network share UNC path with \f[V]--volname\f[R],
this will implicitly set the \f[V]--network-mode\f[R] option, so the
following two examples have same result:
.IP
.nf
\f[C]
rclone nfsmount remote:path/to/files X: --network-mode
rclone nfsmount remote:path/to/files X: --volname \[rs]\[rs]server\[rs]share
\f[R]
.fi
.PP
You may also specify the network share UNC path as the mountpoint
itself.
Then rclone will automatically assign a drive letter, same as with
\f[V]*\f[R] and use that as mountpoint, and instead use the UNC path
specified as the volume name, as if it were specified with the
\f[V]--volname\f[R] option.
This will also implicitly set the \f[V]--network-mode\f[R] option.
This means the following two examples have same result:
.IP
.nf
\f[C]
rclone nfsmount remote:path/to/files \[rs]\[rs]cloud\[rs]remote
rclone nfsmount remote:path/to/files * --volname \[rs]\[rs]cloud\[rs]remote
\f[R]
.fi
.PP
There is yet another way to enable network mode, and to set the share
path, and that is to pass the \[dq]native\[dq] libfuse/WinFsp option
directly: \f[V]--fuse-flag --VolumePrefix=\[rs]server\[rs]share\f[R].
Note that the path must be with just a single backslash prefix in this
case.
.PP
\f[I]Note:\f[R] In previous versions of rclone this was the only
supported method.
.PP
Read more about drive
mapping (https://en.wikipedia.org/wiki/Drive_mapping)
.PP
See also Limitations section below.
.SS Windows filesystem permissions
.PP
The FUSE emulation layer on Windows must convert between the POSIX-based
permission model used in FUSE, and the permission model used in Windows,
based on access-control lists (ACL).
.PP
The mounted filesystem will normally get three entries in its
access-control list (ACL), representing permissions for the POSIX
permission scopes: Owner, group and others.
By default, the owner and group will be taken from the current user, and
the built-in group \[dq]Everyone\[dq] will be used to represent others.
The user/group can be customized with FUSE options \[dq]UserName\[dq]
and \[dq]GroupName\[dq], e.g.
\f[V]-o UserName=user123 -o GroupName=\[dq]Authenticated Users\[dq]\f[R].
The permissions on each entry will be set according to options
\f[V]--dir-perms\f[R] and \f[V]--file-perms\f[R], which takes a value in
traditional Unix numeric
notation (https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation).
.PP
The default permissions corresponds to
\f[V]--file-perms 0666 --dir-perms 0777\f[R], i.e.
read and write permissions to everyone.
This means you will not be able to start any programs from the mount.
To be able to do that you must add execute permissions, e.g.
\f[V]--file-perms 0777 --dir-perms 0777\f[R] to add it to everyone.
If the program needs to write files, chances are you will have to enable
VFS File Caching as well (see also limitations).
Note that the default write permission have some restrictions for
accounts other than the owner, specifically it lacks the \[dq]write
extended attributes\[dq], as explained next.
.PP
The mapping of permissions is not always trivial, and the result you see
in Windows Explorer may not be exactly like you expected.
For example, when setting a value that includes write access for the
group or others scope, this will be mapped to individual permissions
\[dq]write attributes\[dq], \[dq]write data\[dq] and \[dq]append
data\[dq], but not \[dq]write extended attributes\[dq].
Windows will then show this as basic permission \[dq]Special\[dq]
instead of \[dq]Write\[dq], because \[dq]Write\[dq] also covers the
\[dq]write extended attributes\[dq] permission.
When setting digit 0 for group or others, to indicate no permissions,
they will still get individual permissions \[dq]read attributes\[dq],
\[dq]read extended attributes\[dq] and \[dq]read permissions\[dq].
This is done for compatibility reasons, e.g.
to allow users without additional permissions to be able to read basic
metadata about files like in Unix.
.PP
WinFsp 2021 (version 1.9) introduced a new FUSE option
\[dq]FileSecurity\[dq], that allows the complete specification of file
security descriptors using
SDDL (https://docs.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-string-format).
With this you get detailed control of the resulting permissions,
compared to use of the POSIX permissions described above, and no
additional permissions will be added automatically for compatibility
with Unix.
Some example use cases will following.
.PP
If you set POSIX permissions for only allowing access to the owner,
using \f[V]--file-perms 0600 --dir-perms 0700\f[R], the user group and
the built-in \[dq]Everyone\[dq] group will still be given some special
permissions, as described above.
Some programs may then (incorrectly) interpret this as the file being
accessible by everyone, for example an SSH client may warn about
\[dq]unprotected private key file\[dq].
You can work around this by specifying
\f[V]-o FileSecurity=\[dq]D:P(A;;FA;;;OW)\[dq]\f[R], which sets file all
access (FA) to the owner (OW), and nothing else.
.PP
When setting write permissions then, except for the owner, this does not
include the \[dq]write extended attributes\[dq] permission, as mentioned
above.
This may prevent applications from writing to files, giving permission
denied error instead.
To set working write permissions for the built-in \[dq]Everyone\[dq]
group, similar to what it gets by default but with the addition of the
\[dq]write extended attributes\[dq], you can specify
\f[V]-o FileSecurity=\[dq]D:P(A;;FRFW;;;WD)\[dq]\f[R], which sets file
read (FR) and file write (FW) to everyone (WD).
If file execute (FX) is also needed, then change to
\f[V]-o FileSecurity=\[dq]D:P(A;;FRFWFX;;;WD)\[dq]\f[R], or set file all
access (FA) to get full access permissions, including delete, with
\f[V]-o FileSecurity=\[dq]D:P(A;;FA;;;WD)\[dq]\f[R].
.SS Windows caveats
.PP
Drives created as Administrator are not visible to other accounts, not
even an account that was elevated to Administrator with the User Account
Control (UAC) feature.
A result of this is that if you mount to a drive letter from a Command
Prompt run as Administrator, and then try to access the same drive from
Windows Explorer (which does not run as Administrator), you will not be
able to see the mounted drive.
.PP
If you don\[aq]t need to access the drive from applications running with
administrative privileges, the easiest way around this is to always
create the mount from a non-elevated command prompt.
.PP
To make mapped drives available to the user account that created them
regardless if elevated or not, there is a special Windows setting called
linked
connections (https://docs.microsoft.com/en-us/troubleshoot/windows-client/networking/mapped-drives-not-available-from-elevated-command#detail-to-configure-the-enablelinkedconnections-registry-entry)
that can be enabled.
.PP
It is also possible to make a drive mount available to everyone on the
system, by running the process creating it as the built-in SYSTEM
account.
There are several ways to do this: One is to use the command-line
utility
PsExec (https://docs.microsoft.com/en-us/sysinternals/downloads/psexec),
from Microsoft\[aq]s Sysinternals suite, which has option \f[V]-s\f[R]
to start processes as the SYSTEM account.
Another alternative is to run the mount command from a Windows Scheduled
Task, or a Windows Service, configured to run as the SYSTEM account.
A third alternative is to use the WinFsp.Launcher
infrastructure (https://github.com/winfsp/winfsp/wiki/WinFsp-Service-Architecture)).
Read more in the install documentation (https://rclone.org/install/).
Note that when running rclone as another user, it will not use the
configuration file from your profile unless you tell it to with the
\f[V]--config\f[R] (https://rclone.org/docs/#config-string) option.
Note also that it is now the SYSTEM account that will have the owner
permissions, and other accounts will have permissions according to the
group or others scopes.
As mentioned above, these will then not get the \[dq]write extended
attributes\[dq] permission, and this may prevent writing to files.
You can work around this with the FileSecurity option, see example
above.
.PP
Note that mapping to a directory path, instead of a drive letter, does
not suffer from the same limitations.
.SS Mounting on macOS
.PP
Mounting on macOS can be done either via built-in NFS
server (https://rclone.org/commands/rclone_serve_nfs/),
macFUSE (https://osxfuse.github.io/) (also known as osxfuse) or
FUSE-T (https://www.fuse-t.org/).
macFUSE is a traditional FUSE driver utilizing a macOS kernel extension
(kext).
FUSE-T is an alternative FUSE system which \[dq]mounts\[dq] via an NFSv4
local server.
.SS Unicode Normalization
.PP
It is highly recommended to keep the default of
\f[V]--no-unicode-normalization=false\f[R] for all \f[V]mount\f[R] and
\f[V]serve\f[R] commands on macOS.
For details, see
vfs-case-sensitivity (https://rclone.org/commands/rclone_mount/#vfs-case-sensitivity).
.SS NFS mount
.PP
For macOS (and other platforms where this path is supported), prefer the
dedicated rclone nfsmount (https://rclone.org/commands/rclone_nfsmount/)
command.
It starts the NFS server and performs the mount for you.
\f[V]rclone mount\f[R] itself still uses FUSE (macFUSE/FUSE-T) and does
not switch to NFS via a flag.
.PP
This method spins up an NFS server using serve
nfs (https://rclone.org/commands/rclone_serve_nfs/) command and mounts
it to the specified mountpoint.
If you run this in background mode using |--daemon|, you will need to
send SIGTERM signal to the rclone process using |kill| command to stop
the mount.
.PP
Note that \f[V]--nfs-cache-handle-limit\f[R] controls the maximum number
of cached file handles stored by the \f[V]nfsmount\f[R] caching handler.
This should not be set too low or you may experience errors when trying
to access files.
The default is 1000000, but consider lowering this limit if the
server\[aq]s system resource usage causes problems.
.SS macFUSE Notes
.PP
If installing macFUSE using dmg
packages (https://github.com/osxfuse/osxfuse/releases) from the website,
rclone will locate the macFUSE libraries without any further
intervention.
If however, macFUSE is installed using the
macports (https://www.macports.org/) package manager, the following
addition steps are required.
.IP
.nf
\f[C]
sudo mkdir /usr/local/lib
cd /usr/local/lib
sudo ln -s /opt/local/lib/libfuse.2.dylib
\f[R]
.fi
.SS FUSE-T Limitations, Caveats, and Notes
.PP
There are some limitations, caveats, and notes about how it works.
These are current as of FUSE-T version 1.0.14.
.SS ModTime update on read
.PP
As per the FUSE-T
wiki (https://github.com/macos-fuse-t/fuse-t/wiki#caveats):
.RS
.PP
File access and modification times cannot be set separately as it seems
to be an issue with the NFS client which always modifies both.
Can be reproduced with \f[V]touch -m\f[R] and \f[V]touch -a\f[R]
commands
.RE
.PP
This means that viewing files with various tools, notably macOS Finder,
will cause rlcone to update the modification time of the file.
This may make rclone upload a full new copy of the file.
.SS Read Only mounts
.PP
When mounting with \f[V]--read-only\f[R], attempts to write to files
will fail \f[I]silently\f[R] as opposed to with a clear warning as in
macFUSE.
.SS Mounting on Linux
.PP
On newer versions of Ubuntu, you may encounter the following error when
running \f[V]rclone mount\f[R]:
.RS
.PP
NOTICE: mount helper error: fusermount3: mount failed: Permission denied
CRITICAL: Fatal error: failed to mount FUSE fs: fusermount: exit status
1
.RE
.PP
This may be due to newer Apparmor (https://wiki.ubuntu.com/AppArmor)
restrictions, which can be disabled with
\f[V]sudo aa-disable /usr/bin/fusermount3\f[R] (you may need to
\f[V]sudo apt install apparmor-utils\f[R] beforehand).
.SS Mounting on OpenBSD
.PP
\f[V]rclone nfsmount\f[R] works on OpenBSD by spinning up the serve
nfs (https://rclone.org/commands/rclone_serve_nfs/) server and mounting
it with the system \f[V]mount_nfs(8)\f[R], the same approach used for
the NFS mount method on macOS.
There is no FUSE-based mount option on OpenBSD, so \f[V]nfsmount\f[R] is
the only way to mount rclone remotes as a local file system there.
.SS portmap registration
.PP
OpenBSD\[aq]s kernel NFS client locates \f[V]mountd\f[R] through the
system portmapper rather than connecting to a fixed port, so
rclone\[aq]s in-process NFS server needs to be registered with portmap
before it can be mounted.
Start the \f[V]serve nfs\f[R] server on a fixed port, stop the system
NFS services so they don\[aq]t conflict with it, then register that port
with portmap for both the \f[V]nfs\f[R] and \f[V]mountd\f[R] RPC
programs (this is the recipe from hjicks in
#8578 (https://github.com/rclone/rclone/issues/8578#issuecomment-2799229652)):
.IP
.nf
\f[C]
rclone serve nfs --addr localhost:<PORT> remote:path
doas rcctl stop nfsd portmap
doas pkill -9 mountd # mountd can\[aq]t be stopped via rcctl(8)
doas rcctl -f start portmap
doas rpcinfo -s nfs 3 <PORT>
doas rpcinfo -s mountd 3 <PORT>
\f[R]
.fi
.PP
Replace \f[V]<PORT>\f[R] with the port passed to \f[V]--addr\f[R].
Port 2049 works too, but needs either running rclone as root or
adjusting \f[V]sysctl(8)\f[R] at securelevel 0, so a non-privileged port
is simpler for testing.
.SS Use \f[V]mount_nfs -T\f[R], not \f[V]mount\f[R]
.PP
Mount the exported NFS share directly with \f[V]mount_nfs(8)\f[R] using
the \f[V]-T\f[R] flag to force TCP, rather than the generic
\f[V]mount(8)\f[R] wrapper - OpenBSD\[aq]s \f[V]mount(8)\f[R] does not
understand \f[V]-T\f[R] and rejects it with
\f[V]unknown option -- T\f[R]:
.IP
.nf
\f[C]
mount_nfs -T localhost:/ /path/to/local/mount
\f[R]
.fi
.PP
\f[V]rclone nfsmount\f[R] does this for you automatically on OpenBSD (it
calls \f[V]mount_nfs\f[R] directly with \f[V]-T\f[R] instead of going
through \f[V]mount\f[R]), so this is only needed if you are mounting the
\f[V]serve nfs\f[R] export by hand.
.SS AUTH_UNIX and existing limitations
.PP
OpenBSD\[aq]s (and the other BSDs\[aq]) kernel NFS client requires the
server to offer the \f[V]AUTH_UNIX\f[R] authentication flavor during the
MOUNT RPC handshake; a server that only offers \f[V]AUTH_NULL\f[R] is
rejected with
\f[V]mount_nfs: can\[aq]t access /: Authentication error\f[R].
rclone\[aq]s NFS server advertises \f[V]AUTH_UNIX\f[R] for this reason,
though it does not implement any per-user access control on top of it -
see issue #8578 (https://github.com/rclone/rclone/issues/8578) for the
background on this and for the current state of OpenBSD support.
.SS Limitations
.PP
Without the use of \f[V]--vfs-cache-mode\f[R] this can only write files
sequentially, it can only seek when reading.
This means that many applications won\[aq]t work with their files on an
rclone mount without \f[V]--vfs-cache-mode writes\f[R] or
\f[V]--vfs-cache-mode full\f[R].
See the VFS File Caching section for more info.
When using NFS mount on macOS, if you don\[aq]t specify
|--vfs-cache-mode| the mount point will be read-only.
.PP
Bucket-based remotes - Azure Blob, Swift, S3, Google Cloud Storage and
B2 - can\[aq]t store empty directories.
Of these, only Azure Blob, Google Cloud Storage and S3 can preserve them
when you add \f[V]--xxx-directory_markers\f[R]; otherwise, empty
directories will vanish once they drop out of the directory cache.
.PP
When \f[V]rclone mount\f[R] is invoked on Unix with \f[V]--daemon\f[R]
flag, the main rclone program will wait for the background mount to
become ready or until the timeout specified by the
\f[V]--daemon-wait\f[R] flag.
On Linux it can check mount status using ProcFS so the flag in fact sets
\f[B]maximum\f[R] time to wait, while the real wait can be less.
On macOS / BSD the time to wait is constant and the check is performed
only at the end.
We advise you to set wait time on macOS reasonably.
.PP
Only supported on Linux, FreeBSD, OS X and Windows at the moment.
.SS rclone nfsmount vs rclone sync/copy
.PP
File systems expect things to be 100% reliable, whereas cloud storage
systems are a long way from 100% reliable.
The rclone sync/copy commands cope with this with lots of retries.
However rclone nfsmount can\[aq]t use retries in the same way without
making local copies of the uploads.
Look at the VFS File Caching for solutions to make nfsmount more
reliable.
.SS Attribute caching
.PP
You can use the flag \f[V]--attr-timeout\f[R] to set the time the kernel
caches the attributes (size, modification time, etc.)
for directory entries.
.PP
The default is \f[V]1s\f[R] which caches files just long enough to avoid
too many callbacks to rclone from the kernel.
.PP
In theory 0s should be the correct value for filesystems which can
change outside the control of the kernel.
However this causes quite a few problems such as rclone using too much
memory (https://github.com/rclone/rclone/issues/2157), rclone not
serving files to
samba (https://forum.rclone.org/t/rclone-1-39-vs-1-40-mount-issue/5112)
and excessive time listing
directories (https://github.com/rclone/rclone/issues/2095#issuecomment-371141147).
.PP
The kernel can cache the info about a file for the time given by
\f[V]--attr-timeout\f[R].
You may see corruption if the remote file changes length during this
window.
It will show up as either a truncated file or a file with garbage on the
end.
With \f[V]--attr-timeout 1s\f[R] this is very unlikely but not
impossible.
The higher you set \f[V]--attr-timeout\f[R] the more likely it is.
The default setting of \[dq]1s\[dq] is the lowest setting which
mitigates the problems above.
.PP
If you set it higher (\f[V]10s\f[R] or \f[V]1m\f[R] say) then the kernel
will call back to rclone less often making it more efficient, however
there is more chance of the corruption issue above.
.PP
If files don\[aq]t change on the remote outside of the control of rclone
then there is no chance of corruption.
.PP
This is the same as setting the attr_timeout option in mount.fuse.
.SS Filters
.PP
Note that all the rclone filters can be used to select a subset of the
files to be visible in the mount.
.SS systemd
.PP
When running rclone nfsmount as a systemd service, it is possible to use
Type=notify.
In this case the service will enter the started state after the
mountpoint has been successfully set up.
Units having the rclone nfsmount service specified as a requirement will
see all files and folders immediately in this mode.
.PP
Note that systemd runs mount units without any environment variables
including \f[V]PATH\f[R] or \f[V]HOME\f[R].
This means that tilde (\f[V]\[ti]\f[R]) expansion will not work and you
should provide \f[V]--config\f[R] and \f[V]--cache-dir\f[R] explicitly
as absolute paths via rclone arguments.
Since mounting requires the \f[V]fusermount\f[R] or
\f[V]fusermount3\f[R] program, rclone will use the fallback PATH of
\f[V]/bin:/usr/bin\f[R] in this scenario.
Please ensure that \f[V]fusermount\f[R]/\f[V]fusermount3\f[R] is present
on this PATH.
.SS Rclone as Unix mount helper
.PP
The core Unix program \f[V]/bin/mount\f[R] normally takes the
\f[V]-t FSTYPE\f[R] argument then runs the \f[V]/sbin/mount.FSTYPE\f[R]
helper program passing it mount options as \f[V]-o key=val,...\f[R] or
\f[V]--opt=...\f[R].
Automount (classic or systemd) behaves in a similar way.
.PP
rclone by default expects GNU-style flags \f[V]--key val\f[R].
To run it as a mount helper you should symlink rclone binary to
\f[V]/sbin/mount.rclone\f[R] and optionally \f[V]/usr/bin/rclonefs\f[R],
e.g.
\f[V]ln -s /usr/bin/rclone /sbin/mount.rclone\f[R].
rclone will detect it and translate command-line arguments
appropriately.
.PP
Now you can run classic mounts like this:
.IP
.nf
\f[C]
mount sftp1:subdir /mnt/data -t rclone -o vfs_cache_mode=writes,sftp_key_file=/path/to/pem
\f[R]
.fi
.PP
or create systemd mount units:
.IP
.nf
\f[C]
# /etc/systemd/system/mnt-data.mount
[Unit]
Description=Mount for /mnt/data
[Mount]
Type=rclone
What=sftp1:subdir
Where=/mnt/data
Options=rw,_netdev,allow_other,args2env,vfs-cache-mode=writes,config=/etc/rclone.conf,cache-dir=/var/rclone
\f[R]
.fi
.PP
optionally accompanied by systemd automount unit
.IP
.nf
\f[C]
# /etc/systemd/system/mnt-data.automount
[Unit]
Description=AutoMount for /mnt/data
[Automount]
Where=/mnt/data
TimeoutIdleSec=600
[Install]
WantedBy=multi-user.target
\f[R]
.fi
.PP
or add in \f[V]/etc/fstab\f[R] a line like
.IP
.nf
\f[C]
sftp1:subdir /mnt/data rclone rw,noauto,nofail,_netdev,x-systemd.automount,args2env,vfs_cache_mode=writes,config=/etc/rclone.conf,cache_dir=/var/cache/rclone 0 0
\f[R]
.fi
.PP
or use classic Automountd.
Remember to provide explicit \f[V]config=...,cache-dir=...\f[R] as a
workaround for mount units being run without \f[V]HOME\f[R].
.PP
Rclone in the mount helper mode will split \f[V]-o\f[R] argument(s) by
comma, replace \f[V]_\f[R] by \f[V]-\f[R] and prepend \f[V]--\f[R] to
get the command-line flags.
Options containing commas or spaces can be wrapped in single or double
quotes.
Any inner quotes inside outer quotes of the same type should be doubled.
.PP
Mount option syntax includes a few extra options treated specially:
.IP \[bu] 2
\f[V]env.NAME=VALUE\f[R] will set an environment variable for the mount
process.
This helps with Automountd and Systemd.mount which don\[aq]t allow
setting custom environment for mount helpers.
Typically you will use \f[V]env.HTTPS_PROXY=proxy.host:3128\f[R] or
\f[V]env.HOME=/root\f[R]
.IP \[bu] 2
\f[V]command=cmount\f[R] can be used to run \f[V]cmount\f[R] or any
other rclone command rather than the default \f[V]mount\f[R].
.IP \[bu] 2
\f[V]args2env\f[R] will pass mount options to the mount helper running
in background via environment variables instead of command line
arguments.
This allows to hide secrets from such commands as \f[V]ps\f[R] or
\f[V]pgrep\f[R].
.IP \[bu] 2
\f[V]vv...\f[R] will be transformed into appropriate
\f[V]--verbose=N\f[R]
.IP \[bu] 2
standard mount options like \f[V]x-systemd.automount\f[R],
\f[V]_netdev\f[R], \f[V]nosuid\f[R] and alike are intended only for
Automountd and ignored by rclone.
.SS VFS - Virtual File System
.PP
This command uses the VFS layer.
This adapts the cloud storage objects that rclone uses into something
which looks much more like a disk filing system.
.PP
Cloud storage objects have lots of properties which aren\[aq]t like disk
files - you can\[aq]t extend them or write to the middle of them, so the
VFS layer has to deal with that.
Because there is no one right way of doing this there are various
options explained below.
.PP
The VFS layer also implements a directory cache - this caches info about
files and directories (but not the data) in memory.
.SS VFS Directory Cache
.PP
Using the \f[V]--dir-cache-time\f[R] flag, you can control how long a
directory should be considered up to date and not refreshed from the
backend.
Changes made through the VFS will appear immediately or invalidate the
cache.
.IP
.nf
\f[C]
--dir-cache-time duration Time to cache directory entries for (default 5m0s)
--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)
\f[R]
.fi
.PP
However, changes made directly on the cloud storage by the web interface
or a different copy of rclone will only be picked up once the directory
cache expires if the backend configured does not support polling for
changes.
If the backend supports polling, changes will be picked up within the
polling interval.
.PP
You can send a \f[V]SIGHUP\f[R] signal to rclone for it to flush all
directory caches, regardless of how old they are.
Assuming only one rclone instance is running, you can reset the cache
like this:
.IP
.nf
\f[C]
kill -SIGHUP $(pidof rclone)
\f[R]
.fi
.PP
If you configure rclone with a remote control then you can use rclone rc
to flush the whole directory cache:
.IP
.nf
\f[C]
rclone rc vfs/forget
\f[R]
.fi
.PP
Or individual files or directories:
.IP
.nf
\f[C]
rclone rc vfs/forget file=path/to/file dir=path/to/dir
\f[R]
.fi
.SS VFS File Buffering
.PP
The \f[V]--buffer-size\f[R] flag determines the amount of memory, that
will be used to buffer data in advance.
.PP
Each open file will try to keep the specified amount of data in memory
at all times.
The buffered data is bound to one open file and won\[aq]t be shared.
.PP
This flag is a upper limit for the used memory per open file.
The buffer will only use memory for data that is downloaded but not yet
read.
If the buffer is empty, only a small amount of memory will be used.
.PP
The maximum memory used by rclone for buffering can be up to
\f[V]--buffer-size * open files\f[R].
.SS VFS File Caching
.PP
These flags control the VFS file caching options.
File caching is necessary to make the VFS layer appear compatible with a
normal file system.
It can be disabled at the cost of some compatibility.
.PP
For example you\[aq]ll need to enable VFS caching if you want to read
and write simultaneously to a file.
See below for more details.
.PP
Note that the VFS cache is separate from the cache backend and you may
find that you need one or the other or both.
.IP
.nf
\f[C]
--cache-dir string Directory rclone will use for caching.
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
\f[R]
.fi
.PP
If run with \f[V]-vv\f[R] rclone will print the location of the file
cache.
The files are stored in the user cache file area which is OS dependent
but can be controlled with \f[V]--cache-dir\f[R] or setting the
appropriate environment variable.
.PP
The cache has 4 different modes selected by \f[V]--vfs-cache-mode\f[R].
The higher the cache mode the more compatible rclone becomes at the cost
of using disk space.
.PP
Note that files are written back to the remote only when they are closed
and if they haven\[aq]t been accessed for \f[V]--vfs-write-back\f[R]
seconds.
If rclone is quit or dies with files that haven\[aq]t been uploaded,
these will be uploaded next time rclone is run with the same flags.
.PP
If using \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] note that the cache may exceed
these quotas for two reasons.
Firstly because it is only checked every
\f[V]--vfs-cache-poll-interval\f[R].
Secondly because open files cannot be evicted from the cache.
When \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] is exceeded, rclone will attempt to
evict the least accessed files from the cache first.
rclone will start with files that haven\[aq]t been accessed for the
longest.
This cache flushing strategy is efficient and more relevant files are
likely to remain cached.
.PP
The \f[V]--vfs-cache-max-age\f[R] will evict files from the cache after
the set time since last access has passed; it is based on access time,
not on when the file was first added to the cache.
The default value of 1 hour will start evicting files from cache that
haven\[aq]t been accessed for 1 hour.
When a cached file is accessed the 1 hour timer is reset to 0 and will
wait for 1 more hour before evicting.
Specify the time with standard notation, s, m, h, d, w .
.PP
You \f[B]should not\f[R] run two copies of rclone using the same VFS
cache with the same or overlapping remotes if using
\f[V]--vfs-cache-mode > off\f[R].
This can potentially cause data corruption if you do.
You can work around this by giving each rclone its own cache hierarchy
with \f[V]--cache-dir\f[R].
You don\[aq]t need to worry about this if the remotes in use don\[aq]t
overlap.
.SS --vfs-cache-mode off
.PP
In this mode (the default) the cache will read directly from the remote
and write directly to the remote without caching anything on disk.
.PP
This will mean some operations are not possible
.IP \[bu] 2
Files can\[aq]t be opened for both read AND write
.IP \[bu] 2
Files opened for write can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files open for read with O_TRUNC will be opened write only
.IP \[bu] 2
Files open for write only will behave as if O_TRUNC was supplied
.IP \[bu] 2
Open modes O_APPEND, O_TRUNC are ignored
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode minimal
.PP
This is very similar to \[dq]off\[dq] except that files opened for read
AND write will be buffered to disk.
This means that files opened for write will be a lot more compatible,
but uses the minimal disk space.
.PP
These operations are not possible
.IP \[bu] 2
Files opened for write only can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files opened for write only will ignore O_APPEND, O_TRUNC
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode writes
.PP
In this mode files opened for read only are still read directly from the
remote, write only and read/write files are buffered to disk first.
.PP
This mode should support all normal file system operations.
.PP
If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.
.SS --vfs-cache-mode full
.PP
In this mode all reads and writes are buffered to and from disk.
When data is read from the remote this is buffered to disk as well.
.PP
In this mode the files in the cache will be sparse files and rclone will
keep track of which bits of the files it has downloaded.
.PP
So if an application only reads the starts of each file, then rclone
will only buffer the start of the file.
These files will appear to be their full size in the cache, but they
will be sparse files with only the data that has been downloaded present
in them.
.PP
This mode should support all normal file system operations and is
otherwise identical to \f[V]--vfs-cache-mode\f[R] writes.
.PP
When reading a file rclone will read \f[V]--buffer-size\f[R] plus
\f[V]--vfs-read-ahead\f[R] bytes ahead.
The \f[V]--buffer-size\f[R] is buffered in memory whereas the
\f[V]--vfs-read-ahead\f[R] is buffered on disk.
.PP
When using this mode it is recommended that \f[V]--buffer-size\f[R] is
not set too large and \f[V]--vfs-read-ahead\f[R] is set large if
required.
.PP
\f[B]IMPORTANT\f[R] not all file systems support sparse files.
In particular FAT/exFAT do not.
Rclone will perform very badly if the cache directory is on a filesystem
which doesn\[aq]t support sparse files and it will log an ERROR message
if one is detected.
.SS Fingerprinting
.PP
Various parts of the VFS use fingerprinting to see if a local file copy
has changed relative to a remote file.
Fingerprints are made from:
.IP \[bu] 2
size
.IP \[bu] 2
modification time
.IP \[bu] 2
hash
.PP
where available on an object.
.PP
On some backends some of these attributes are slow to read (they take an
extra API call per object, or extra work per object).
.PP
For example \f[V]hash\f[R] is slow with the \f[V]local\f[R] and
\f[V]sftp\f[R] backends as they have to read the entire file and hash
it, and \f[V]modtime\f[R] is slow with the \f[V]s3\f[R],
\f[V]swift\f[R], \f[V]ftp\f[R] and \f[V]qinqstor\f[R] backends because
they need to do an extra API call to fetch it.
.PP
If you use the \f[V]--vfs-fast-fingerprint\f[R] flag then rclone will
not include the slow operations in the fingerprint.
This makes the fingerprinting less accurate but much faster and will
improve the opening time of cached files.
.PP
If you are running a vfs cache over \f[V]local\f[R], \f[V]s3\f[R] or
\f[V]swift\f[R] backends then using this flag is recommended.
.PP
Note that if you change the value of this flag, the fingerprints of the
files in the cache may be invalidated and the files will need to be
downloaded again.
.SS VFS Chunked Reading
.PP
When rclone reads files from a remote it reads them in chunks.
This means that rather than requesting the whole file rclone reads the
chunk specified.
This can reduce the used download quota for some remotes by requesting
only chunks from the remote that are actually read, at the cost of an
increased number of requests.
.PP
These flags control the chunking:
.IP
.nf
\f[C]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
--vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
\f[R]
.fi
.PP
The chunking behaves differently depending on the
\f[V]--vfs-read-chunk-streams\f[R] parameter.
.SS \f[V]--vfs-read-chunk-streams\f[R] == 0
.PP
Rclone will start reading a chunk of size
\f[V]--vfs-read-chunk-size\f[R], and then double the size for each read.
When \f[V]--vfs-read-chunk-size-limit\f[R] is specified, and greater
than \f[V]--vfs-read-chunk-size\f[R], the chunk size for each open file
will get doubled only until the specified value is reached.
If the value is \[dq]off\[dq], which is the default, the limit is
disabled and the chunk size will grow indefinitely.
.PP
With \f[V]--vfs-read-chunk-size 100M\f[R] and
\f[V]--vfs-read-chunk-size-limit 0\f[R] the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on.
When \f[V]--vfs-read-chunk-size-limit 500M\f[R] is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.
.PP
Setting \f[V]--vfs-read-chunk-size\f[R] to \f[V]0\f[R] or \[dq]off\[dq]
disables chunked reading.
.PP
The chunks will not be buffered in memory.
.SS \f[V]--vfs-read-chunk-streams\f[R] > 0
.PP
Rclone reads \f[V]--vfs-read-chunk-streams\f[R] chunks of size
\f[V]--vfs-read-chunk-size\f[R] concurrently.
The size for each read will stay constant.
.PP
This improves performance massively on high latency links or very high
bandwidth links to high performance object stores.
.PP
Some experimentation will be needed to find the optimum values of
\f[V]--vfs-read-chunk-size\f[R] and \f[V]--vfs-read-chunk-streams\f[R]
as these will depend on the backend in use and the latency to the
backend.
.PP
For high performance object stores (eg AWS S3) a reasonable place to
start might be \f[V]--vfs-read-chunk-streams 16\f[R] and
\f[V]--vfs-read-chunk-size 4M\f[R].
In testing with AWS S3 the performance scaled roughly as the
\f[V]--vfs-read-chunk-streams\f[R] setting.
.PP
Similar settings should work for high latency links, but depending on
the latency they may need more \f[V]--vfs-read-chunk-streams\f[R] in
order to get the throughput.
.SS VFS Performance
.PP
These flags may be used to enable/disable features of the VFS for
performance or other reasons.
See also the chunked reading feature.
.PP
In particular S3 and Swift benefit hugely from the
\f[V]--no-modtime\f[R] flag (or use \f[V]--use-server-modtime\f[R] for a
slightly different effect) as each read of the modification time takes a
transaction.
.IP
.nf
\f[C]
--no-checksum Don\[aq]t compare checksums on up/download.
--no-modtime Don\[aq]t read/write the modification time (can speed things up).
--no-seek Don\[aq]t allow seeking in files.
--read-only Only allow read-only access.
\f[R]
.fi
.PP
Sometimes rclone is delivered reads or writes out of order.
Rather than seeking rclone will wait a short time for the in sequence
read or write to come in.
These flags only come into effect when not using an on disk cache file.
.IP
.nf
\f[C]
--vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
When using VFS write caching (\f[V]--vfs-cache-mode\f[R] with value
writes or full), the global flag \f[V]--transfers\f[R] can be set to
adjust the number of parallel uploads of modified files from the cache
(the related global flag \f[V]--checkers\f[R] has no effect on the VFS).
.IP
.nf
\f[C]
--transfers int Number of file transfers to run in parallel (default 4)
\f[R]
.fi
.SS Symlinks
.PP
By default the VFS does not support symlinks.
However this may be enabled with either of the following flags:
.IP
.nf
\f[C]
--links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension.
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
\f[R]
.fi
.PP
As most cloud storage systems do not support symlinks directly, rclone
stores the symlink as a normal file with a special extension.
So a file which appears as a symlink \f[V]link-to-file.txt\f[R] would be
stored on cloud storage as \f[V]link-to-file.txt.rclonelink\f[R] and the
contents would be the path to the symlink destination.
.PP
Note that \f[V]--links\f[R] enables symlink translation globally in
rclone - this includes any backend which supports the concept (for
example the local backend).
\f[V]--vfs-links\f[R] just enables it for the VFS layer.
.PP
This scheme is compatible with that used by the local backend with the
--local-links flag (https://rclone.org/local/#symlinks-junction-points).
.PP
The \f[V]--vfs-links\f[R] flag has been designed for
\f[V]rclone mount\f[R], \f[V]rclone nfsmount\f[R] and
\f[V]rclone serve nfs\f[R].
.PP
It hasn\[aq]t been tested with the other \f[V]rclone serve\f[R] commands
yet.
.PP
A limitation of the current implementation is that it expects the caller
to resolve sub-symlinks.
For example given this directory tree
.IP
.nf
\f[C]
\&.
├── dir
│\ \ └── file.txt
└── linked-dir -> dir
\f[R]
.fi
.PP
The VFS will correctly resolve \f[V]linked-dir\f[R] but not
\f[V]linked-dir/file.txt\f[R].
This is not a problem for the tested commands but may be for other
commands.
.PP
\f[B]Note\f[R] that there is an outstanding issue with symlink support
issue #8245 (https://github.com/rclone/rclone/issues/8245) with
duplicate files being created when symlinks are moved into directories
where there is a file of the same name (or vice versa).
.SS VFS Case Sensitivity
.PP
Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.
.PP
File systems in modern Windows are case-insensitive but case-preserving:
although existing files can be opened using any case, the exact case
used to create the file is preserved and available for programs to
query.
It is not allowed for two files in the same directory to differ only by
case.
.PP
Usually file systems on macOS are case-insensitive.
It is possible to make macOS file systems case-sensitive but that is not
the default.
.PP
The \f[V]--vfs-case-insensitive\f[R] VFS flag controls how rclone
handles these two cases.
If its value is \[dq]false\[dq], rclone passes file names to the remote
as-is.
If the flag is \[dq]true\[dq] (or appears without a value on the command
line), rclone may perform a \[dq]fixup\[dq] as explained below.
.PP
The user may specify a file name to open/delete/rename/etc with a case
different than what is stored on the remote.
If an argument refers to an existing file with exactly the same name,
then the case of the existing file on the disk will be used.
However, if a file name with exactly the same name is not found but a
name differing only by case exists, rclone will transparently fixup the
name.
This fixup happens only when an existing file is requested.
Case sensitivity of file names created anew by rclone is controlled by
the underlying remote.
.PP
Note that case sensitivity of the operating system running rclone (the
target) may differ from case sensitivity of a file system presented by
rclone (the source).
The flag controls whether \[dq]fixup\[dq] is performed to satisfy the
target.
.PP
If the flag is not provided on the command line, then its default value
depends on the operating system where rclone runs: \[dq]true\[dq] on
Windows and macOS, \[dq]false\[dq] otherwise.
If the flag is provided without a value, then it is \[dq]true\[dq].
.PP
The \f[V]--no-unicode-normalization\f[R] flag controls whether a similar
\[dq]fixup\[dq] is performed for filenames that differ but are
canonically
equivalent (https://en.wikipedia.org/wiki/Unicode_equivalence) with
respect to unicode.
Unicode normalization can be particularly helpful for users of macOS,
which prefers form NFD instead of the NFC used by most other platforms.
It is therefore highly recommended to keep the default of
\f[V]false\f[R] on macOS, to avoid encoding compatibility issues.
.PP
In the (probably unlikely) event that a directory has multiple duplicate
filenames after applying case and unicode normalization, the
\f[V]--vfs-block-norm-dupes\f[R] flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory.
For this reason, it is recommended to leave this disabled if not needed.
However, macOS users may wish to consider using it, as otherwise, if a
remote directory contains both NFC and NFD versions of the same
filename, an odd situation will occur: both versions of the file will be
visible in the mount, and both will appear to be editable, however,
editing either version will actually result in only the NFD version
getting edited under the hood.
\f[V]--vfs-block- norm-dupes\f[R] prevents this confusion by detecting
this scenario, hiding the duplicates, and logging an error, similar to
how this is handled in \f[V]rclone sync\f[R].
.SS VFS Disk Options
.PP
This flag allows you to manually set the statistics about the filing
system.
It can be useful when those statistics cannot be read correctly
automatically.
.IP
.nf
\f[C]
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
\f[R]
.fi
.SS Alternate report of used bytes
.PP
Some backends, most notably S3, do not report the amount of bytes used.
If you need this information to be available when running \f[V]df\f[R]
on the filesystem, then pass the flag \f[V]--vfs-used-is-size\f[R] to
rclone.
With this flag set, instead of relying on the backend to report this
information, rclone will scan the whole remote similar to
\f[V]rclone size\f[R] and compute the total used space itself.
.PP
\f[B]WARNING\f[R]: Contrary to \f[V]rclone size\f[R], this flag ignores
filters so that the result is accurate.
However, this is very inefficient and may cost lots of API calls
resulting in extra charges.
Use it as a last resort and only with caching.
.SS VFS Metadata
.PP
If you use the \f[V]--vfs-metadata-extension\f[R] flag you can get the
VFS to expose files which contain the
metadata (https://rclone.org/docs/#metadata) as a JSON blob.
These files will not appear in the directory listing, but can be
\f[V]stat\f[R]-ed and opened and once they have been they \f[B]will\f[R]
appear in directory listings until the directory cache expires.
.PP
Note that some backends won\[aq]t create metadata unless you pass in the
\f[V]--metadata\f[R] flag.
.PP
For example, using \f[V]rclone mount\f[R] with
\f[V]--metadata --vfs-metadata-extension .metadata\f[R] we get
.IP
.nf
\f[C]
$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
$ cat /mnt/1G.metadata
{
\[dq]atime\[dq]: \[dq]2025-03-04T17:34:22.317069787Z\[dq],
\[dq]btime\[dq]: \[dq]2025-03-03T16:03:37.708253808Z\[dq],
\[dq]gid\[dq]: \[dq]1000\[dq],
\[dq]mode\[dq]: \[dq]100664\[dq],
\[dq]mtime\[dq]: \[dq]2025-03-03T16:03:39.640238323Z\[dq],
\[dq]uid\[dq]: \[dq]1000\[dq]
}
$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
-rw-rw-r-- 1 user user 185 Mar 3 16:03 1G.metadata
\f[R]
.fi
.PP
If the file has no metadata it will be returned as \f[V]{}\f[R] and if
there is an error reading the metadata the error will be returned as
\f[V]{\[dq]error\[dq]:\[dq]error string\[dq]}\f[R].
.IP
.nf
\f[C]
rclone nfsmount remote:path /path/to/mountpoint [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--addr string IPaddress:Port or :Port to bind server to
--allow-idmap Allow id-mapped mounts (Linux 6.12+, mount2 only)
--allow-non-empty Allow mounting over a non-empty directory (not supported on Windows)
--allow-other Allow access to other users (not supported on Windows)
--allow-root Allow access to root user (not supported on Windows)
--async-read Use asynchronous reads (not supported on Windows) (default true)
--attr-timeout Duration Time for which file/directory attributes are cached (default 1s)
--daemon Run mount in background and exit parent process (as background output is suppressed, use --log-file with --log-format=pid,... to monitor) (not supported on Windows)
--daemon-timeout Duration Time limit for rclone to respond to kernel (not supported on Windows) (default 0s)
--daemon-wait Duration Time to wait for ready mount from daemon (maximum time on Linux, constant sleep time on OSX/BSD) (not supported on Windows) (default 1m0s)
--debug-fuse Debug the FUSE internals - needs -v
--default-permissions Makes kernel enforce access control based on the file mode (not supported on Windows)
--devname string Set the device name - default is remote:path
--dir-cache-time Duration Time to cache directory entries for (default 5m0s)
--dir-perms FileMode Directory permissions (default 777)
--direct-io Use Direct IO, disables caching of data
--file-perms FileMode File permissions (default 666)
--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 (not supported on Windows) (default 1000)
-h, --help help for nfsmount
--link-perms FileMode Link permissions (default 666)
--max-read-ahead SizeSuffix The number of bytes that can be prefetched for sequential reads (not supported on Windows) (default 128Ki)
--mount-case-insensitive Tristate Tell the OS the mount is case insensitive (true) or sensitive (false) regardless of the backend (auto) (default unset)
--network-mode Mount as remote network drive, instead of fixed disk drive (supported on Windows only)
--nfs-cache-dir string The directory the NFS handle cache will use if set
--nfs-cache-handle-limit int max file handles cached simultaneously (min 5) (default 1000000)
--nfs-cache-type memory|disk|symlink Type of NFS handle cache to use (default memory)
--nfs-mount-path string Subpath of the remote to mount via NFS (must be an existing directory). (default \[dq]/\[dq])
--no-checksum Don\[aq]t compare checksums on up/download
--no-modtime Don\[aq]t read/write the modification time (can speed things up)
--no-seek Don\[aq]t allow seeking in files
--noappledouble Ignore Apple Double (._) and .DS_Store files (supported on OSX only) (default true)
--noapplexattr Ignore all \[dq]com.apple.*\[dq] extended attributes (supported on OSX only)
-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 and only on supported remotes (set 0 to disable) (default 1m0s)
--read-only Only allow read-only access
--sudo Use sudo to run the mount/umount commands as root.
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask FileMode Override the permission bits set by the filesystem (not supported on Windows) (default 002)
--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)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-case-insensitive If a file name not found, find a case insensitive match
--vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
--vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
--vfs-handle-caching Duration Time to keep file handle and downloaders alive after last close (default 5s)
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
--vfs-metadata-extension string Set the extension to read metadata from
--vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--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 (\[aq]off\[aq] is unlimited) (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
--volname string Set the volume name (supported on Windows and OSX only)
--write-back-cache Makes kernel buffer writes before sending them to rclone (without this, writethrough caching is used) (not supported on Windows)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone obscure
.PP
Obscure password for use in the rclone config file.
.SS Synopsis
.PP
In the rclone config file, human-readable passwords are obscured.
Obscuring them is done by encrypting them and writing them out in
base64.
This is \f[B]not\f[R] a secure way of encrypting these passwords as
rclone can decrypt them - it is to prevent \[dq]eyedropping\[dq] -
namely someone seeing a password in the rclone config file by accident.
.PP
Many equally important things (like access tokens) are not obscured in
the config file.
However it is very hard to shoulder surf a 64 character hex token.
.PP
This command can also accept a password through STDIN instead of an
argument by passing a hyphen as an argument.
This will use the first line of STDIN as the password not including the
trailing newline.
.IP
.nf
\f[C]
echo \[aq]secretpassword\[aq] | rclone obscure -
\f[R]
.fi
.PP
If there is no data on STDIN to read, rclone obscure will default to
obfuscating the hyphen itself.
.PP
If you want to encrypt the config file then please use config file
encryption - see rclone
config (https://rclone.org/commands/rclone_config/) for more info.
.IP
.nf
\f[C]
rclone obscure password [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for obscure
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone rc
.PP
Run a command against a running rclone.
.SS Synopsis
.PP
This runs a command against a running rclone.
Use the \f[V]--url\f[R] flag to specify an non default URL to connect
on.
This can be either a \[dq]:port\[dq] which is taken to mean
http://localhost:port or a \[dq]host:port\[dq] which is taken to mean
http://host:port.
.PP
A username and password can be passed in with \f[V]--user\f[R] and
\f[V]--pass\f[R].
.PP
Note that \f[V]--rc-addr\f[R], \f[V]--rc-user\f[R], \f[V]--rc-pass\f[R]
will be read also for \f[V]--url\f[R], \f[V]--user\f[R],
\f[V]--pass\f[R].
.PP
The \f[V]--unix-socket\f[R] flag can be used to connect over a unix
socket like this
.IP
.nf
\f[C]
# start server on /tmp/my.socket
rclone rcd --rc-addr unix:///tmp/my.socket
# Connect to it
rclone rc --unix-socket /tmp/my.socket core/stats
\f[R]
.fi
.PP
Arguments should be passed in as parameter=value.
.PP
The result will be returned as a JSON object by default.
.PP
The \f[V]--json\f[R] 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.
.PP
The \f[V]-o\f[R]/\f[V]--opt\f[R] option can be used to set a key
\[dq]opt\[dq] with key, value options in the form \f[V]-o key=value\f[R]
or \f[V]-o key\f[R].
It can be repeated as many times as required.
This is useful for rc commands which take the \[dq]opt\[dq] parameter
which by convention is a dictionary of strings.
.IP
.nf
\f[C]
-o key=value -o key2
\f[R]
.fi
.PP
Will place this in the \[dq]opt\[dq] value
.IP
.nf
\f[C]
{\[dq]key\[dq]:\[dq]value\[dq], \[dq]key2\[dq],\[dq]\[dq])
\f[R]
.fi
.PP
The \f[V]-a\f[R]/\f[V]--arg\f[R] option can be used to set strings in
the \[dq]arg\[dq] value.
It can be repeated as many times as required.
This is useful for rc commands which take the \[dq]arg\[dq] parameter
which by convention is a list of strings.
.IP
.nf
\f[C]
-a value -a value2
\f[R]
.fi
.PP
Will place this in the \[dq]arg\[dq] value
.IP
.nf
\f[C]
[\[dq]value\[dq], \[dq]value2\[dq]]
\f[R]
.fi
.PP
Use \f[V]--loopback\f[R] to connect to the rclone instance running
\f[V]rclone rc\f[R].
This is very useful for testing commands without having to run an rclone
rc server, e.g.:
.IP
.nf
\f[C]
rclone rc --loopback operations/about fs=/
\f[R]
.fi
.PP
Use \f[V]rclone rc\f[R] to see a list of all possible commands.
.IP
.nf
\f[C]
rclone rc commands parameter [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-a, --arg stringArray Argument placed in the \[dq]arg\[dq] array
-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\[aq]t output the JSON result
-o, --opt stringArray Option in the form name=value or name placed in the \[dq]opt\[dq] array
--pass string Password to use to connect to rclone remote control
--unix-socket string Path to a unix domain socket to dial to, instead of opening a TCP connection directly
--url string URL to connect to rclone remote control (default \[dq]http://localhost:5572/\[dq])
--user string Username to use to rclone remote control
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone rcat
.PP
Copies standard input to file on remote.
.SS Synopsis
.PP
Reads from standard input (stdin) and copies it to a single remote file.
.IP
.nf
\f[C]
echo \[dq]hello world\[dq] | rclone rcat remote:path/to/file
ffmpeg - | rclone rcat remote:path/to/file
\f[R]
.fi
.PP
If the remote file already exists, it will be overwritten.
.PP
rcat will try to upload small files in a single request, which is
usually more efficient than the streaming/chunked upload endpoints,
which use multiple requests.
Exact behaviour depends on the remote.
What is considered a small file may be set through
\f[V]--streaming-upload-cutoff\f[R].
Uploading only starts after the cutoff is reached or if the file ends
before that.
The data must fit into RAM.
The cutoff needs to be small enough to adhere the limits of your remote,
please see there.
Generally speaking, setting this cutoff too high will decrease your
performance.
.PP
Use the \f[V]--size\f[R] flag to preallocate the file in advance at the
remote end and actually stream it, even if remote backend doesn\[aq]t
support streaming.
.PP
\f[V]--size\f[R] should be the exact size of the input stream in bytes.
If the size of the stream is different in length to the \f[V]--size\f[R]
passed in then the transfer will likely fail.
.PP
Note that the upload cannot be retried because the data is not stored.
If the backend supports multipart uploading then individual chunks can
be retried.
If you need to transfer a lot of data, you may be better off caching it
locally and then \f[V]rclone move\f[R] it to the destination which can
use retries.
.IP
.nf
\f[C]
rclone rcat remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for rcat
--size int File size hint to preallocate (default -1)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone rcd
.PP
Run rclone listening to remote control commands only.
.SS Synopsis
.PP
This runs rclone so that it only listens to remote control commands.
.PP
This is useful if you are controlling rclone via the rc API.
.PP
If you pass in a path to a directory, rclone will serve that directory
for GET requests on the URL passed in.
It will also open the URL in the browser when rclone is run.
.PP
See the rc documentation (https://rclone.org/rc/) for more info on the
rc flags.
.SS Server options
.PP
Use \f[V]--rc-addr\f[R] to specify which IP address and port the server
should listen on, eg \f[V]--rc-addr 1.2.3.4:8000\f[R] or
\f[V]--rc-addr :8080\f[R] to listen to all IPs.
By default it only listens on localhost.
You can use port :0 to let the OS choose an available port.
.PP
If you set \f[V]--rc-addr\f[R] to listen on a public or LAN accessible
IP address then using Authentication is advised - see the next section
for info.
.PP
You can use a unix socket by setting the url to
\f[V]unix:///path/to/socket\f[R] or just by using an absolute path name.
.PP
\f[V]--rc-addr\f[R] may be repeated to listen on multiple
IPs/ports/sockets.
Socket activation, described further below, can also be used to
accomplish the same.
.PP
\f[V]--rc-server-read-timeout\f[R] and
\f[V]--rc-server-write-timeout\f[R] can be used to control the timeouts
on the server.
Note that this is the total time for a transfer.
.PP
\f[V]--rc-max-header-bytes\f[R] controls the maximum number of bytes the
server will accept in the HTTP header.
.PP
\f[V]--rc-response-header\f[R] can be used to set an HTTP header for all
responses, will overriding existing values.
The flag may be repeated to add multiple headers.
Use the format \f[V]Header-Name: value\f[R].
.PP
\f[V]--rc-allow-origin\f[R] enables cross-origin (CORS) requests from
browsers by setting the \f[V]Access-Control-Allow-Origin\f[R] header on
every response to the origin given, e.g.
\f[V]--rc-allow-origin https://app.example.com\f[R].
Browser CORS preflight OPTIONS requests are answered by rclone without
needing authentication as browsers never send credentials with them.
Setting this to \f[V]*\f[R] allows any origin which is a security risk
on an authenticated server.
.PP
\f[V]--rc-baseurl\f[R] controls the URL prefix that rclone serves from.
By default rclone will serve from the root.
If you used \f[V]--rc-baseurl \[dq]/rclone\[dq]\f[R] then rclone would
serve from a URL starting with \[dq]/rclone/\[dq].
This is useful if you wish to proxy rclone serve.
Rclone automatically inserts leading and trailing \[dq]/\[dq] on
\f[V]--rc-baseurl\f[R], so \f[V]--rc-baseurl \[dq]rclone\[dq]\f[R],
\f[V]--rc-baseurl \[dq]/rclone\[dq]\f[R] and
\f[V]--rc-baseurl \[dq]/rclone/\[dq]\f[R] are all treated identically.
.PP
\f[V]--rc-disable-zip\f[R] may be set to disable the zipping download
option.
.SS Protocol
.PP
The server supports HTTP/1.1 and HTTP/2.
HTTP/2 is used automatically for TLS connections.
For non-TLS connections, HTTP/2 cleartext (h2c) is supported, allowing
HTTP/2 without encryption.
.SS TLS (SSL)
.PP
By default this will serve over http.
If you want you can serve over https.
You will need to supply the \f[V]--rc-cert\f[R] and \f[V]--rc-key\f[R]
flags.
If you wish to do client side certificate validation then you will need
to supply \f[V]--rc-client-ca\f[R] also.
.PP
When TLS is configured every listener given with \f[V]--rc-addr\f[R]
serves TLS.
An individual listener can be prefixed with \f[V]http://\f[R] to serve
unencrypted HTTP on that address, or with \f[V]tls://\f[R] to state
explicitly that it must serve TLS.
Using a \f[V]tls://\f[R] address without \f[V]--rc-cert\f[R] and
\f[V]--rc-key\f[R] is an error.
.PP
\f[V]--rc-cert\f[R] must be set to the path of a file containing either
a PEM encoded certificate, or a concatenation of that with the CA
certificate.
\f[V]--rc-key\f[R] must be set to the path of a file with the PEM
encoded private key.
If setting \f[V]--rc-client-ca\f[R], it should be set to the path of a
file with PEM encoded client certificate authority certificates.
.PP
\f[V]--rc-min-tls-version\f[R] is minimum TLS version that is
acceptable.
Valid values are \[dq]tls1.0\[dq], \[dq]tls1.1\[dq], \[dq]tls1.2\[dq]
and \[dq]tls1.3\[dq] (default \[dq]tls1.0\[dq]).
.SS Socket activation
.PP
Instead of the listening addresses specified above, rclone will listen
to all FDs passed by the service manager, if any (and ignore any
arguments passed by \f[V]--rc-addr\f[R]).
.PP
This allows rclone to be a socket-activated service.
It can be configured with .socket and .service unit files as described
in
<https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html>.
.PP
Socket activation can be tested ad-hoc with the
\f[V]systemd-socket-activate\f[R]command
.IP
.nf
\f[C]
systemd-socket-activate -l 8000 -- rclone serve
\f[R]
.fi
.PP
This will socket-activate rclone on the first connection to port 8000
over TCP.
.SS Template
.PP
\f[V]--rc-template\f[R] allows a user to specify a custom markup
template for HTTP and WebDAV serve functions.
The server exports the following markup to be used within the template
to server pages:
.PP
.TS
tab(@);
lw(22.6n) lw(24.7n) lw(22.6n).
T{
Parameter
T}@T{
Subparameter
T}@T{
Description
T}
_
T{
\&.Name
T}@T{
T}@T{
The full path of a file/directory.
T}
T{
\&.Title
T}@T{
T}@T{
Directory listing of \[aq].Name\[aq].
T}
T{
\&.Sort
T}@T{
T}@T{
The current sort used.
This is changeable via \[aq]?sort=\[aq] parameter.
Possible values: namedirfirst, name, size, time (default namedirfirst).
T}
T{
\&.Order
T}@T{
T}@T{
The current ordering used.
This is changeable via \[aq]?order=\[aq] parameter.
Possible values: asc, desc (default asc).
T}
T{
\&.Query
T}@T{
T}@T{
Currently unused.
T}
T{
\&.Path
T}@T{
T}@T{
The path of the directory from the root with leading and trailing
slashes, e.g.
\[aq]/dir/\[aq].
T}
T{
\&.IsRoot
T}@T{
T}@T{
Boolean for if this is the root directory.
T}
T{
\&.UpLink
T}@T{
T}@T{
The link to the parent directory.
T}
T{
\&.Static
T}@T{
T}@T{
Boolean for if the listing is being written as a static page by rclone
index.
T}
T{
\&.NumDirs
T}@T{
T}@T{
The number of directories in the listing.
T}
T{
\&.NumFiles
T}@T{
T}@T{
The number of files in the listing.
T}
T{
\&.TotalSize
T}@T{
T}@T{
The total size in bytes of the files in the listing.
T}
T{
\&.Breadcrumb
T}@T{
T}@T{
Allows for creating a relative navigation.
T}
T{
T}@T{
\&.Link
T}@T{
The link of the Text relative to the root.
T}
T{
T}@T{
\&.Text
T}@T{
The Name of the directory.
T}
T{
\&.Entries
T}@T{
T}@T{
Information about a specific file/directory.
T}
T{
T}@T{
\&.URL
T}@T{
The url of an entry.
T}
T{
T}@T{
\&.Leaf
T}@T{
Currently same as \[aq].URL\[aq] but intended to be just the name.
T}
T{
T}@T{
\&.IsDir
T}@T{
Boolean for if an entry is a directory or not.
T}
T{
T}@T{
\&.Size
T}@T{
Size in bytes of the entry.
T}
T{
T}@T{
\&.ModTime
T}@T{
The UTC timestamp of an entry.
T}
T{
T}@T{
\&.MimeType
T}@T{
The MIME type of an entry guessed from its name, or
\[aq]inode/directory\[aq].
T}
.TE
.PP
The server also makes the following functions available so that they can
be used within the template.
These functions help extend the options for dynamic rendering of HTML.
They can be used to render HTML based on specific conditions.
.PP
.TS
tab(@);
lw(35.0n) lw(35.0n).
T{
Function
T}@T{
Description
T}
_
T{
afterEpoch
T}@T{
Returns the time since the epoch for the given time.
T}
T{
contains
T}@T{
Checks whether a given substring is present or not in a given string.
T}
T{
hasPrefix
T}@T{
Checks whether the given string begins with the specified prefix.
T}
T{
hasSuffix
T}@T{
Checks whether the given string end with the specified suffix.
T}
.TE
.SS Authentication
.PP
By default this will serve files without needing a login.
.PP
You can either use an htpasswd file which can take lots of users, or set
a single username and password with the \f[V]--rc-user\f[R] and
\f[V]--rc-pass\f[R] flags.
.PP
Alternatively, you can have the reverse proxy manage authentication and
use the username provided in the configured header with
\f[V]--user-from-header\f[R] (e.g.,
\f[V]--rc-user-from-header=x-remote-user\f[R]).
Ensure the proxy is trusted and headers cannot be spoofed, as
misconfiguration may lead to unauthorized access.
.PP
If either of the above authentication methods is not configured and
client certificates are required by the \f[V]--client-ca\f[R] flag
passed to the server, the client certificate common name will be
considered as the username.
.PP
Use \f[V]--rc-htpasswd /path/to/htpasswd\f[R] to provide an htpasswd
file.
This is in standard apache format and supports MD5, SHA1 and BCrypt for
basic authentication.
Bcrypt is recommended.
.PP
To create an htpasswd file:
.IP
.nf
\f[C]
touch htpasswd
htpasswd -B htpasswd user
htpasswd -B htpasswd anotherUser
\f[R]
.fi
.PP
Use the same hash format and cost for every entry in the file.
If the entries differ, the time taken to reject a wrong password can
reveal which usernames exist.
.PP
The password file can be updated while rclone is running.
.PP
When authentication is enabled every request must be authenticated,
including HTTP OPTIONS requests, as the answer to an OPTIONS request can
reveal whether a path exists.
Health checks or monitoring which use unauthenticated OPTIONS requests
will need to send credentials.
The exception is browser CORS preflight requests when
\f[V]--rc-allow-origin\f[R] is set, which are answered without
authentication as browsers never send credentials with them.
.PP
Use \f[V]--rc-realm\f[R] to set the authentication realm.
.PP
Use \f[V]--rc-salt\f[R] to change the password hashing salt from the
default.
.IP
.nf
\f[C]
rclone rcd <path to files to serve>* [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for rcd
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS RC Options
.PP
Flags to control the Remote Control API
.IP
.nf
\f[C]
--rc Enable the remote control server
--rc-addr stringArray IPaddress:Port or :Port to bind server to (default localhost:5572)
--rc-allow-origin string Origin which cross-domain request (CORS) can be executed from
--rc-baseurl string Prefix for URLs - leave blank for root
--rc-cert string TLS PEM key (concatenation of certificate and CA certificate)
--rc-client-ca string Client certificate authority to verify clients with
--rc-enable-metrics Enable the Prometheus metrics path at the remote control server
--rc-files string Path to local files to serve on the HTTP server
--rc-htpasswd string A htpasswd file - if not provided no authentication is done
--rc-job-expire-duration Duration Expire finished async jobs older than this value (default 1m0s)
--rc-job-expire-interval Duration Interval to check for expired async jobs (default 10s)
--rc-key string TLS PEM Private key
--rc-max-header-bytes int Maximum size of request header (default 4096)
--rc-min-tls-version string Minimum TLS version that is acceptable (default \[dq]tls1.0\[dq])
--rc-no-auth Don\[aq]t require auth for certain methods
--rc-pass string Password for authentication
--rc-realm string Realm for authentication
--rc-response-header stringArray Set HTTP header for all responses, overriding existing values
--rc-salt string Password hashing salt (default \[dq]dlPL2MqE\[dq])
--rc-serve Enable the serving of remote objects
--rc-serve-no-modtime Don\[aq]t read the modification time (can speed things up)
--rc-server-read-timeout Duration Timeout for server reading data (default 1h0m0s)
--rc-server-write-timeout Duration Timeout for server writing data (default 1h0m0s)
--rc-template string User-specified template
--rc-user string User name for authentication
--rc-user-from-header string User name from a defined HTTP header
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone rmdirs
.PP
Remove empty directories under the path.
.SS Synopsis
.PP
This recursively removes any empty directories (including directories
that only contain empty directories), that it finds under the path.
The root path itself will also be removed if it is empty, unless you
supply the \f[V]--leave-root\f[R] flag.
.PP
Use command rmdir (https://rclone.org/commands/rclone_rmdir/) to delete
just the empty directory given by path, not recurse.
.PP
This is useful for tidying up remotes that rclone has left a lot of
empty directories in.
For example the delete (https://rclone.org/commands/rclone_delete/)
command will delete files but leave the directory structure (unless used
with option \f[V]--rmdirs\f[R]).
.PP
This will delete \f[V]--checkers\f[R] directories concurrently so if you
have thousands of empty directories consider increasing this number.
.PP
To delete a path and any objects in it, use the
purge (https://rclone.org/commands/rclone_purge/) command.
.IP
.nf
\f[C]
rclone rmdirs remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for rmdirs
--leave-root Do not remove root directory if empty
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone selfupdate
.PP
Update the rclone binary.
.SS Synopsis
.PP
This command downloads the latest release of rclone and replaces the
currently running binary.
The download is verified with a hashsum and cryptographically signed
signature; see the release signing
docs (https://rclone.org/release_signing/) for details.
.PP
If used without flags (or with implied \f[V]--stable\f[R] flag), this
command will install the latest stable release.
However, some issues may be fixed (or features added) only in the latest
beta release.
In such cases you should run the command with the \f[V]--beta\f[R] flag,
i.e.
\f[V]rclone selfupdate --beta\f[R].
You can check in advance what version would be installed by adding the
\f[V]--check\f[R] flag, then repeat the command without it when you are
satisfied.
.PP
Sometimes the rclone team may recommend you a concrete beta or stable
rclone release to troubleshoot your issue or add a bleeding edge
feature.
The \f[V]--version VER\f[R] flag, if given, will update to the concrete
version instead of the latest one.
If you omit micro version from \f[V]VER\f[R] (for example
\f[V]1.53\f[R]), the latest matching micro version will be used.
.PP
Upon successful update rclone will print a message that contains a
previous version number.
You will need it if you later decide to revert your update for some
reason.
Then you\[aq]ll have to note the previous version and run the following
command: \f[V]rclone selfupdate [--beta] OLDVER\f[R].
If the old version contains only dots and digits (for example
\f[V]v1.54.0\f[R]) then it\[aq]s a stable release so you won\[aq]t need
the \f[V]--beta\f[R] flag.
Beta releases have an additional information similar to
\f[V]v1.54.0-beta.5111.06f1c0c61\f[R].
(if you are a developer and use a locally built rclone, the version
number will end with \f[V]-DEV\f[R], you will have to rebuild it as it
obviously can\[aq]t be distributed).
.PP
If you previously installed rclone via a package manager, the package
may include local documentation or configure services.
You may wish to update with the flag \f[V]--package deb\f[R] or
\f[V]--package rpm\f[R] (whichever is correct for your OS) to update
these too.
This command with the default \f[V]--package zip\f[R] will update only
the rclone executable so the local manual may become inaccurate after
it.
.PP
The rclone mount (https://rclone.org/commands/rclone_mount/) command may
or may not support extended FUSE options depending on the build and OS.
\f[V]selfupdate\f[R] will refuse to update if the capability would be
discarded.
.PP
Note: Windows forbids deletion of a currently running executable so this
command will rename the old executable to \[aq]rclone.old.exe\[aq] upon
success.
.PP
Please note that this command was not available before rclone version
1.55.
If it fails for you with the message
\f[V]unknown command \[dq]selfupdate\[dq]\f[R] then you will need to
update manually following the install
documentation (https://rclone.org/install/).
.IP
.nf
\f[C]
rclone selfupdate [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--beta Install beta release
--check Check for latest release, do not download
-h, --help help for selfupdate
--output string Save the downloaded binary at a given path (default: replace running binary)
--package string Package format: zip|deb|rpm (default: zip)
--stable Install stable release (this is the default)
--version string Install the given rclone version (default: latest)
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone serve
.PP
Serve a remote over a protocol.
.SS Synopsis
.PP
Serve a remote over a given protocol.
Requires the use of a subcommand to specify the protocol, e.g.
.IP
.nf
\f[C]
rclone serve http remote:
\f[R]
.fi
.PP
When the \[dq]--metadata\[dq] flag is enabled, the following metadata
fields will be provided as headers: - \[dq]content-disposition\[dq] -
\[dq]cache-control\[dq] - \[dq]content-language\[dq] -
\[dq]content-encoding\[dq] Note: The availability of these fields
depends on whether the remote supports metadata.
.PP
Each subcommand has its own options which you can see in their help.
.IP
.nf
\f[C]
rclone serve <protocol> [opts] <remote> [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for serve
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.IP \[bu] 2
rclone serve dlna (https://rclone.org/commands/rclone_serve_dlna/) -
Serve remote:path over DLNA
.IP \[bu] 2
rclone serve docker (https://rclone.org/commands/rclone_serve_docker/) -
Serve any remote on docker\[aq]s volume plugin API.
.IP \[bu] 2
rclone serve ftp (https://rclone.org/commands/rclone_serve_ftp/) - Serve
remote:path over FTP.
.IP \[bu] 2
rclone serve http (https://rclone.org/commands/rclone_serve_http/) -
Serve the remote over HTTP.
.IP \[bu] 2
rclone serve nfs (https://rclone.org/commands/rclone_serve_nfs/) - Serve
the remote as an NFS mount
.IP \[bu] 2
rclone serve restic (https://rclone.org/commands/rclone_serve_restic/) -
Serve the remote for restic\[aq]s REST API.
.IP \[bu] 2
rclone serve s3 (https://rclone.org/commands/rclone_serve_s3/) - Serve
remote:path over s3.
.IP \[bu] 2
rclone serve sftp (https://rclone.org/commands/rclone_serve_sftp/) -
Serve the remote over SFTP.
.IP \[bu] 2
rclone serve webdav (https://rclone.org/commands/rclone_serve_webdav/) -
Serve remote:path over WebDAV.
.SH rclone serve dlna
.PP
Serve remote:path over DLNA
.SS Synopsis
.PP
Run a DLNA media server for media stored in an rclone remote.
Many devices, such as the Xbox and PlayStation, can automatically
discover this server in the LAN and play audio/video from it.
VLC is also supported.
Service discovery uses UDP multicast packets (SSDP) and will thus only
work on LANs.
.PP
Rclone will list all files present in the remote, without filtering
based on media formats or file extensions.
Additionally, there is no media transcoding support.
This means that some players might show files that they are not able to
play back correctly.
.PP
Rclone will add external subtitle files (.srt) to videos if they have
the same filename as the video file itself (except the extension),
either in the same directory as the video, or in a \[dq]Subs\[dq]
subdirectory.
.SS Server options
.PP
Use \f[V]--addr\f[R] to specify which IP address and port the server
should listen on, e.g.
\f[V]--addr 1.2.3.4:8000\f[R] or \f[V]--addr :8080\f[R] to listen to all
IPs.
.PP
Use \f[V]--name\f[R] to choose the friendly server name, which is by
default \[dq]rclone (hostname)\[dq].
.PP
Use \f[V]--log-trace\f[R] in conjunction with \f[V]-vv\f[R] to enable
additional debug logging of all UPNP traffic.
.SS VFS - Virtual File System
.PP
This command uses the VFS layer.
This adapts the cloud storage objects that rclone uses into something
which looks much more like a disk filing system.
.PP
Cloud storage objects have lots of properties which aren\[aq]t like disk
files - you can\[aq]t extend them or write to the middle of them, so the
VFS layer has to deal with that.
Because there is no one right way of doing this there are various
options explained below.
.PP
The VFS layer also implements a directory cache - this caches info about
files and directories (but not the data) in memory.
.SS VFS Directory Cache
.PP
Using the \f[V]--dir-cache-time\f[R] flag, you can control how long a
directory should be considered up to date and not refreshed from the
backend.
Changes made through the VFS will appear immediately or invalidate the
cache.
.IP
.nf
\f[C]
--dir-cache-time duration Time to cache directory entries for (default 5m0s)
--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)
\f[R]
.fi
.PP
However, changes made directly on the cloud storage by the web interface
or a different copy of rclone will only be picked up once the directory
cache expires if the backend configured does not support polling for
changes.
If the backend supports polling, changes will be picked up within the
polling interval.
.PP
You can send a \f[V]SIGHUP\f[R] signal to rclone for it to flush all
directory caches, regardless of how old they are.
Assuming only one rclone instance is running, you can reset the cache
like this:
.IP
.nf
\f[C]
kill -SIGHUP $(pidof rclone)
\f[R]
.fi
.PP
If you configure rclone with a remote control then you can use rclone rc
to flush the whole directory cache:
.IP
.nf
\f[C]
rclone rc vfs/forget
\f[R]
.fi
.PP
Or individual files or directories:
.IP
.nf
\f[C]
rclone rc vfs/forget file=path/to/file dir=path/to/dir
\f[R]
.fi
.SS VFS File Buffering
.PP
The \f[V]--buffer-size\f[R] flag determines the amount of memory, that
will be used to buffer data in advance.
.PP
Each open file will try to keep the specified amount of data in memory
at all times.
The buffered data is bound to one open file and won\[aq]t be shared.
.PP
This flag is a upper limit for the used memory per open file.
The buffer will only use memory for data that is downloaded but not yet
read.
If the buffer is empty, only a small amount of memory will be used.
.PP
The maximum memory used by rclone for buffering can be up to
\f[V]--buffer-size * open files\f[R].
.SS VFS File Caching
.PP
These flags control the VFS file caching options.
File caching is necessary to make the VFS layer appear compatible with a
normal file system.
It can be disabled at the cost of some compatibility.
.PP
For example you\[aq]ll need to enable VFS caching if you want to read
and write simultaneously to a file.
See below for more details.
.PP
Note that the VFS cache is separate from the cache backend and you may
find that you need one or the other or both.
.IP
.nf
\f[C]
--cache-dir string Directory rclone will use for caching.
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
\f[R]
.fi
.PP
If run with \f[V]-vv\f[R] rclone will print the location of the file
cache.
The files are stored in the user cache file area which is OS dependent
but can be controlled with \f[V]--cache-dir\f[R] or setting the
appropriate environment variable.
.PP
The cache has 4 different modes selected by \f[V]--vfs-cache-mode\f[R].
The higher the cache mode the more compatible rclone becomes at the cost
of using disk space.
.PP
Note that files are written back to the remote only when they are closed
and if they haven\[aq]t been accessed for \f[V]--vfs-write-back\f[R]
seconds.
If rclone is quit or dies with files that haven\[aq]t been uploaded,
these will be uploaded next time rclone is run with the same flags.
.PP
If using \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] note that the cache may exceed
these quotas for two reasons.
Firstly because it is only checked every
\f[V]--vfs-cache-poll-interval\f[R].
Secondly because open files cannot be evicted from the cache.
When \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] is exceeded, rclone will attempt to
evict the least accessed files from the cache first.
rclone will start with files that haven\[aq]t been accessed for the
longest.
This cache flushing strategy is efficient and more relevant files are
likely to remain cached.
.PP
The \f[V]--vfs-cache-max-age\f[R] will evict files from the cache after
the set time since last access has passed; it is based on access time,
not on when the file was first added to the cache.
The default value of 1 hour will start evicting files from cache that
haven\[aq]t been accessed for 1 hour.
When a cached file is accessed the 1 hour timer is reset to 0 and will
wait for 1 more hour before evicting.
Specify the time with standard notation, s, m, h, d, w .
.PP
You \f[B]should not\f[R] run two copies of rclone using the same VFS
cache with the same or overlapping remotes if using
\f[V]--vfs-cache-mode > off\f[R].
This can potentially cause data corruption if you do.
You can work around this by giving each rclone its own cache hierarchy
with \f[V]--cache-dir\f[R].
You don\[aq]t need to worry about this if the remotes in use don\[aq]t
overlap.
.SS --vfs-cache-mode off
.PP
In this mode (the default) the cache will read directly from the remote
and write directly to the remote without caching anything on disk.
.PP
This will mean some operations are not possible
.IP \[bu] 2
Files can\[aq]t be opened for both read AND write
.IP \[bu] 2
Files opened for write can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files open for read with O_TRUNC will be opened write only
.IP \[bu] 2
Files open for write only will behave as if O_TRUNC was supplied
.IP \[bu] 2
Open modes O_APPEND, O_TRUNC are ignored
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode minimal
.PP
This is very similar to \[dq]off\[dq] except that files opened for read
AND write will be buffered to disk.
This means that files opened for write will be a lot more compatible,
but uses the minimal disk space.
.PP
These operations are not possible
.IP \[bu] 2
Files opened for write only can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files opened for write only will ignore O_APPEND, O_TRUNC
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode writes
.PP
In this mode files opened for read only are still read directly from the
remote, write only and read/write files are buffered to disk first.
.PP
This mode should support all normal file system operations.
.PP
If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.
.SS --vfs-cache-mode full
.PP
In this mode all reads and writes are buffered to and from disk.
When data is read from the remote this is buffered to disk as well.
.PP
In this mode the files in the cache will be sparse files and rclone will
keep track of which bits of the files it has downloaded.
.PP
So if an application only reads the starts of each file, then rclone
will only buffer the start of the file.
These files will appear to be their full size in the cache, but they
will be sparse files with only the data that has been downloaded present
in them.
.PP
This mode should support all normal file system operations and is
otherwise identical to \f[V]--vfs-cache-mode\f[R] writes.
.PP
When reading a file rclone will read \f[V]--buffer-size\f[R] plus
\f[V]--vfs-read-ahead\f[R] bytes ahead.
The \f[V]--buffer-size\f[R] is buffered in memory whereas the
\f[V]--vfs-read-ahead\f[R] is buffered on disk.
.PP
When using this mode it is recommended that \f[V]--buffer-size\f[R] is
not set too large and \f[V]--vfs-read-ahead\f[R] is set large if
required.
.PP
\f[B]IMPORTANT\f[R] not all file systems support sparse files.
In particular FAT/exFAT do not.
Rclone will perform very badly if the cache directory is on a filesystem
which doesn\[aq]t support sparse files and it will log an ERROR message
if one is detected.
.SS Fingerprinting
.PP
Various parts of the VFS use fingerprinting to see if a local file copy
has changed relative to a remote file.
Fingerprints are made from:
.IP \[bu] 2
size
.IP \[bu] 2
modification time
.IP \[bu] 2
hash
.PP
where available on an object.
.PP
On some backends some of these attributes are slow to read (they take an
extra API call per object, or extra work per object).
.PP
For example \f[V]hash\f[R] is slow with the \f[V]local\f[R] and
\f[V]sftp\f[R] backends as they have to read the entire file and hash
it, and \f[V]modtime\f[R] is slow with the \f[V]s3\f[R],
\f[V]swift\f[R], \f[V]ftp\f[R] and \f[V]qinqstor\f[R] backends because
they need to do an extra API call to fetch it.
.PP
If you use the \f[V]--vfs-fast-fingerprint\f[R] flag then rclone will
not include the slow operations in the fingerprint.
This makes the fingerprinting less accurate but much faster and will
improve the opening time of cached files.
.PP
If you are running a vfs cache over \f[V]local\f[R], \f[V]s3\f[R] or
\f[V]swift\f[R] backends then using this flag is recommended.
.PP
Note that if you change the value of this flag, the fingerprints of the
files in the cache may be invalidated and the files will need to be
downloaded again.
.SS VFS Chunked Reading
.PP
When rclone reads files from a remote it reads them in chunks.
This means that rather than requesting the whole file rclone reads the
chunk specified.
This can reduce the used download quota for some remotes by requesting
only chunks from the remote that are actually read, at the cost of an
increased number of requests.
.PP
These flags control the chunking:
.IP
.nf
\f[C]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
--vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
\f[R]
.fi
.PP
The chunking behaves differently depending on the
\f[V]--vfs-read-chunk-streams\f[R] parameter.
.SS \f[V]--vfs-read-chunk-streams\f[R] == 0
.PP
Rclone will start reading a chunk of size
\f[V]--vfs-read-chunk-size\f[R], and then double the size for each read.
When \f[V]--vfs-read-chunk-size-limit\f[R] is specified, and greater
than \f[V]--vfs-read-chunk-size\f[R], the chunk size for each open file
will get doubled only until the specified value is reached.
If the value is \[dq]off\[dq], which is the default, the limit is
disabled and the chunk size will grow indefinitely.
.PP
With \f[V]--vfs-read-chunk-size 100M\f[R] and
\f[V]--vfs-read-chunk-size-limit 0\f[R] the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on.
When \f[V]--vfs-read-chunk-size-limit 500M\f[R] is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.
.PP
Setting \f[V]--vfs-read-chunk-size\f[R] to \f[V]0\f[R] or \[dq]off\[dq]
disables chunked reading.
.PP
The chunks will not be buffered in memory.
.SS \f[V]--vfs-read-chunk-streams\f[R] > 0
.PP
Rclone reads \f[V]--vfs-read-chunk-streams\f[R] chunks of size
\f[V]--vfs-read-chunk-size\f[R] concurrently.
The size for each read will stay constant.
.PP
This improves performance massively on high latency links or very high
bandwidth links to high performance object stores.
.PP
Some experimentation will be needed to find the optimum values of
\f[V]--vfs-read-chunk-size\f[R] and \f[V]--vfs-read-chunk-streams\f[R]
as these will depend on the backend in use and the latency to the
backend.
.PP
For high performance object stores (eg AWS S3) a reasonable place to
start might be \f[V]--vfs-read-chunk-streams 16\f[R] and
\f[V]--vfs-read-chunk-size 4M\f[R].
In testing with AWS S3 the performance scaled roughly as the
\f[V]--vfs-read-chunk-streams\f[R] setting.
.PP
Similar settings should work for high latency links, but depending on
the latency they may need more \f[V]--vfs-read-chunk-streams\f[R] in
order to get the throughput.
.SS VFS Performance
.PP
These flags may be used to enable/disable features of the VFS for
performance or other reasons.
See also the chunked reading feature.
.PP
In particular S3 and Swift benefit hugely from the
\f[V]--no-modtime\f[R] flag (or use \f[V]--use-server-modtime\f[R] for a
slightly different effect) as each read of the modification time takes a
transaction.
.IP
.nf
\f[C]
--no-checksum Don\[aq]t compare checksums on up/download.
--no-modtime Don\[aq]t read/write the modification time (can speed things up).
--no-seek Don\[aq]t allow seeking in files.
--read-only Only allow read-only access.
\f[R]
.fi
.PP
Sometimes rclone is delivered reads or writes out of order.
Rather than seeking rclone will wait a short time for the in sequence
read or write to come in.
These flags only come into effect when not using an on disk cache file.
.IP
.nf
\f[C]
--vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
When using VFS write caching (\f[V]--vfs-cache-mode\f[R] with value
writes or full), the global flag \f[V]--transfers\f[R] can be set to
adjust the number of parallel uploads of modified files from the cache
(the related global flag \f[V]--checkers\f[R] has no effect on the VFS).
.IP
.nf
\f[C]
--transfers int Number of file transfers to run in parallel (default 4)
\f[R]
.fi
.SS Symlinks
.PP
By default the VFS does not support symlinks.
However this may be enabled with either of the following flags:
.IP
.nf
\f[C]
--links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension.
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
\f[R]
.fi
.PP
As most cloud storage systems do not support symlinks directly, rclone
stores the symlink as a normal file with a special extension.
So a file which appears as a symlink \f[V]link-to-file.txt\f[R] would be
stored on cloud storage as \f[V]link-to-file.txt.rclonelink\f[R] and the
contents would be the path to the symlink destination.
.PP
Note that \f[V]--links\f[R] enables symlink translation globally in
rclone - this includes any backend which supports the concept (for
example the local backend).
\f[V]--vfs-links\f[R] just enables it for the VFS layer.
.PP
This scheme is compatible with that used by the local backend with the
--local-links flag (https://rclone.org/local/#symlinks-junction-points).
.PP
The \f[V]--vfs-links\f[R] flag has been designed for
\f[V]rclone mount\f[R], \f[V]rclone nfsmount\f[R] and
\f[V]rclone serve nfs\f[R].
.PP
It hasn\[aq]t been tested with the other \f[V]rclone serve\f[R] commands
yet.
.PP
A limitation of the current implementation is that it expects the caller
to resolve sub-symlinks.
For example given this directory tree
.IP
.nf
\f[C]
\&.
├── dir
│\ \ └── file.txt
└── linked-dir -> dir
\f[R]
.fi
.PP
The VFS will correctly resolve \f[V]linked-dir\f[R] but not
\f[V]linked-dir/file.txt\f[R].
This is not a problem for the tested commands but may be for other
commands.
.PP
\f[B]Note\f[R] that there is an outstanding issue with symlink support
issue #8245 (https://github.com/rclone/rclone/issues/8245) with
duplicate files being created when symlinks are moved into directories
where there is a file of the same name (or vice versa).
.SS VFS Case Sensitivity
.PP
Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.
.PP
File systems in modern Windows are case-insensitive but case-preserving:
although existing files can be opened using any case, the exact case
used to create the file is preserved and available for programs to
query.
It is not allowed for two files in the same directory to differ only by
case.
.PP
Usually file systems on macOS are case-insensitive.
It is possible to make macOS file systems case-sensitive but that is not
the default.
.PP
The \f[V]--vfs-case-insensitive\f[R] VFS flag controls how rclone
handles these two cases.
If its value is \[dq]false\[dq], rclone passes file names to the remote
as-is.
If the flag is \[dq]true\[dq] (or appears without a value on the command
line), rclone may perform a \[dq]fixup\[dq] as explained below.
.PP
The user may specify a file name to open/delete/rename/etc with a case
different than what is stored on the remote.
If an argument refers to an existing file with exactly the same name,
then the case of the existing file on the disk will be used.
However, if a file name with exactly the same name is not found but a
name differing only by case exists, rclone will transparently fixup the
name.
This fixup happens only when an existing file is requested.
Case sensitivity of file names created anew by rclone is controlled by
the underlying remote.
.PP
Note that case sensitivity of the operating system running rclone (the
target) may differ from case sensitivity of a file system presented by
rclone (the source).
The flag controls whether \[dq]fixup\[dq] is performed to satisfy the
target.
.PP
If the flag is not provided on the command line, then its default value
depends on the operating system where rclone runs: \[dq]true\[dq] on
Windows and macOS, \[dq]false\[dq] otherwise.
If the flag is provided without a value, then it is \[dq]true\[dq].
.PP
The \f[V]--no-unicode-normalization\f[R] flag controls whether a similar
\[dq]fixup\[dq] is performed for filenames that differ but are
canonically
equivalent (https://en.wikipedia.org/wiki/Unicode_equivalence) with
respect to unicode.
Unicode normalization can be particularly helpful for users of macOS,
which prefers form NFD instead of the NFC used by most other platforms.
It is therefore highly recommended to keep the default of
\f[V]false\f[R] on macOS, to avoid encoding compatibility issues.
.PP
In the (probably unlikely) event that a directory has multiple duplicate
filenames after applying case and unicode normalization, the
\f[V]--vfs-block-norm-dupes\f[R] flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory.
For this reason, it is recommended to leave this disabled if not needed.
However, macOS users may wish to consider using it, as otherwise, if a
remote directory contains both NFC and NFD versions of the same
filename, an odd situation will occur: both versions of the file will be
visible in the mount, and both will appear to be editable, however,
editing either version will actually result in only the NFD version
getting edited under the hood.
\f[V]--vfs-block- norm-dupes\f[R] prevents this confusion by detecting
this scenario, hiding the duplicates, and logging an error, similar to
how this is handled in \f[V]rclone sync\f[R].
.SS VFS Disk Options
.PP
This flag allows you to manually set the statistics about the filing
system.
It can be useful when those statistics cannot be read correctly
automatically.
.IP
.nf
\f[C]
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
\f[R]
.fi
.SS Alternate report of used bytes
.PP
Some backends, most notably S3, do not report the amount of bytes used.
If you need this information to be available when running \f[V]df\f[R]
on the filesystem, then pass the flag \f[V]--vfs-used-is-size\f[R] to
rclone.
With this flag set, instead of relying on the backend to report this
information, rclone will scan the whole remote similar to
\f[V]rclone size\f[R] and compute the total used space itself.
.PP
\f[B]WARNING\f[R]: Contrary to \f[V]rclone size\f[R], this flag ignores
filters so that the result is accurate.
However, this is very inefficient and may cost lots of API calls
resulting in extra charges.
Use it as a last resort and only with caching.
.SS VFS Metadata
.PP
If you use the \f[V]--vfs-metadata-extension\f[R] flag you can get the
VFS to expose files which contain the
metadata (https://rclone.org/docs/#metadata) as a JSON blob.
These files will not appear in the directory listing, but can be
\f[V]stat\f[R]-ed and opened and once they have been they \f[B]will\f[R]
appear in directory listings until the directory cache expires.
.PP
Note that some backends won\[aq]t create metadata unless you pass in the
\f[V]--metadata\f[R] flag.
.PP
For example, using \f[V]rclone mount\f[R] with
\f[V]--metadata --vfs-metadata-extension .metadata\f[R] we get
.IP
.nf
\f[C]
$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
$ cat /mnt/1G.metadata
{
\[dq]atime\[dq]: \[dq]2025-03-04T17:34:22.317069787Z\[dq],
\[dq]btime\[dq]: \[dq]2025-03-03T16:03:37.708253808Z\[dq],
\[dq]gid\[dq]: \[dq]1000\[dq],
\[dq]mode\[dq]: \[dq]100664\[dq],
\[dq]mtime\[dq]: \[dq]2025-03-03T16:03:39.640238323Z\[dq],
\[dq]uid\[dq]: \[dq]1000\[dq]
}
$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
-rw-rw-r-- 1 user user 185 Mar 3 16:03 1G.metadata
\f[R]
.fi
.PP
If the file has no metadata it will be returned as \f[V]{}\f[R] and if
there is an error reading the metadata the error will be returned as
\f[V]{\[dq]error\[dq]:\[dq]error string\[dq]}\f[R].
.IP
.nf
\f[C]
rclone serve dlna remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--addr string The ip:port or :port to bind the DLNA http server to (default \[dq]:7879\[dq])
--announce-interval Duration The interval between SSDP announcements (default 12m0s)
--dir-cache-time Duration Time to cache directory entries for (default 5m0s)
--dir-perms FileMode Directory permissions (default 777)
--file-perms FileMode File permissions (default 666)
--gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
-h, --help help for dlna
--interface stringArray The interface to use for SSDP (repeat as necessary)
--link-perms FileMode Link permissions (default 666)
--log-trace Enable trace logging of SOAP traffic
--name string Name of DLNA server
--no-checksum Don\[aq]t compare checksums on up/download
--no-modtime Don\[aq]t read/write the modification time (can speed things up)
--no-seek Don\[aq]t allow seeking in files
--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)
--read-only Only allow read-only access
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask FileMode Override the permission bits set by the filesystem (not supported on Windows) (default 002)
--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)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-case-insensitive If a file name not found, find a case insensitive match
--vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
--vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
--vfs-handle-caching Duration Time to keep file handle and downloaders alive after last close (default 5s)
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
--vfs-metadata-extension string Set the extension to read metadata from
--vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--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 (\[aq]off\[aq] is unlimited) (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone serve (https://rclone.org/commands/rclone_serve/) - Serve a
remote over a protocol.
.SH rclone serve docker
.PP
Serve any remote on docker\[aq]s volume plugin API.
.SS Synopsis
.PP
This command implements the Docker volume plugin API allowing docker to
use rclone as a data storage mechanism for various cloud providers.
rclone provides docker volume plugin based on it.
.PP
To create a docker plugin, one must create a Unix or TCP socket that
Docker will look for when you use the plugin and then it listens for
commands from docker daemon and runs the corresponding code when
necessary.
Docker plugins can run as a managed plugin under control of the docker
daemon or as an independent native service.
For testing, you can just run it directly from the command line, for
example:
.IP
.nf
\f[C]
sudo rclone serve docker --base-dir /tmp/rclone-volumes --socket-addr localhost:8787 -vv
\f[R]
.fi
.PP
Running \f[V]rclone serve docker\f[R] will create the said socket,
listening for commands from Docker to create the necessary Volumes.
Normally you need not give the \f[V]--socket-addr\f[R] flag.
The API will listen on the unix domain socket at
\f[V]/run/docker/plugins/rclone.sock\f[R].
In the example above rclone will create a TCP socket and a small file
\f[V]/etc/docker/plugins/rclone.spec\f[R] containing the socket address.
We use \f[V]sudo\f[R] because both paths are writeable only by the root
user.
.PP
If you later decide to change listening socket, the docker daemon must
be restarted to reconnect to \f[V]/run/docker/plugins/rclone.sock\f[R]
or parse new \f[V]/etc/docker/plugins/rclone.spec\f[R].
Until you restart, any volume related docker commands will timeout
trying to access the old socket.
Running directly is supported on \f[B]Linux only\f[R], not on Windows or
MacOS.
This is not a problem with managed plugin mode described in details in
the full documentation (https://rclone.org/docker).
.PP
The command will create volume mounts under the path given by
\f[V]--base-dir\f[R] (by default
\f[V]/var/lib/docker-volumes/rclone\f[R] available only to root) and
maintain the JSON formatted file \f[V]docker-plugin.state\f[R] in the
rclone cache directory with book-keeping records of created and mounted
volumes.
.PP
All mount and VFS options are submitted by the docker daemon via API,
but you can also provide defaults on the command line as well as set
path to the config file and cache directory or adjust logging verbosity.
.SH Restarting or upgrading the plugin
.PP
When the plugin is restarted (for example with
\f[V]docker plugin disable rclone && docker plugin enable rclone\f[R],
when upgrading the plugin, or when the host reboots) rclone reads its
\f[V]docker-plugin.state\f[R] file and restores the volumes and mounts
that were active before.
The plugin starts serving its socket straight away and re-establishes
the mounts in the background, so a slow or unreachable remote no longer
prevents the plugin from coming back up.
.PP
However, restarting the plugin necessarily stops and restarts the
process that serves the FUSE mounts.
Any container that is \f[B]already running\f[R] and holding files open
on an rclone volume keeps a handle to the old, now dead mount, so those
handles start returning \f[V]transport endpoint is not connected\f[R]
until the container is restarted.
This is a limitation of replacing the process behind a live FUSE mount
and cannot be avoided by rclone - the plugin itself recovers and newly
started containers work normally, but:
.IP \[bu] 2
\f[B]Restart any containers that were using rclone volumes\f[R] after
you restart or upgrade the plugin (e.g.
\f[V]docker restart <container>\f[R]), or stop them before and start
them after.
.IP \[bu] 2
Databases and other applications that keep files open continuously
(Grafana, Prometheus, SQLite-backed apps, etc.)
are the most affected and should always be restarted.
.SH Security
.PP
The plugin API accepts a \f[V]remote\f[R] (aka \f[V]fs\f[R]) option on
volume creation, and this is parsed exactly like an rclone connection
string.
Connection strings are trusted configuration: they may carry inline
backend options, and some backends use those options to run local
commands (for example the \f[V]sftp\f[R] backend\[aq]s \f[V]ssh\f[R]
option spawns an external binary).
Anyone who can send requests to the plugin socket can therefore make
rclone run arbitrary commands as the user running
\f[V]rclone serve docker\f[R] (typically root).
Treat access to the socket as equivalent to that level of access and
only expose it to trusted callers.
.PP
When listening on the default unix socket at
\f[V]/run/docker/plugins/rclone.sock\f[R] rclone creates it with mode
\f[V]0660\f[R] owned by \f[V]root\f[R] and the group given by
\f[V]--socket-gid\f[R] (the process GID by default), so only root and
members of that group - normally just the docker daemon - can reach it.
Do not loosen these permissions or hand the group to untrusted users.
.PP
When using \f[V]--socket-addr\f[R] to listen on a TCP socket there is no
authentication and the API is reachable by anyone who can open the port,
so bind it to a loopback or otherwise trusted address and protect it
with a firewall.
Note that holding Docker daemon access is already equivalent to root on
the host, so a caller able to issue \f[V]docker volume create\f[R] does
not gain anything new from this; the concern is exposing the socket more
widely than the daemon itself.
.SS VFS - Virtual File System
.PP
This command uses the VFS layer.
This adapts the cloud storage objects that rclone uses into something
which looks much more like a disk filing system.
.PP
Cloud storage objects have lots of properties which aren\[aq]t like disk
files - you can\[aq]t extend them or write to the middle of them, so the
VFS layer has to deal with that.
Because there is no one right way of doing this there are various
options explained below.
.PP
The VFS layer also implements a directory cache - this caches info about
files and directories (but not the data) in memory.
.SS VFS Directory Cache
.PP
Using the \f[V]--dir-cache-time\f[R] flag, you can control how long a
directory should be considered up to date and not refreshed from the
backend.
Changes made through the VFS will appear immediately or invalidate the
cache.
.IP
.nf
\f[C]
--dir-cache-time duration Time to cache directory entries for (default 5m0s)
--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)
\f[R]
.fi
.PP
However, changes made directly on the cloud storage by the web interface
or a different copy of rclone will only be picked up once the directory
cache expires if the backend configured does not support polling for
changes.
If the backend supports polling, changes will be picked up within the
polling interval.
.PP
You can send a \f[V]SIGHUP\f[R] signal to rclone for it to flush all
directory caches, regardless of how old they are.
Assuming only one rclone instance is running, you can reset the cache
like this:
.IP
.nf
\f[C]
kill -SIGHUP $(pidof rclone)
\f[R]
.fi
.PP
If you configure rclone with a remote control then you can use rclone rc
to flush the whole directory cache:
.IP
.nf
\f[C]
rclone rc vfs/forget
\f[R]
.fi
.PP
Or individual files or directories:
.IP
.nf
\f[C]
rclone rc vfs/forget file=path/to/file dir=path/to/dir
\f[R]
.fi
.SS VFS File Buffering
.PP
The \f[V]--buffer-size\f[R] flag determines the amount of memory, that
will be used to buffer data in advance.
.PP
Each open file will try to keep the specified amount of data in memory
at all times.
The buffered data is bound to one open file and won\[aq]t be shared.
.PP
This flag is a upper limit for the used memory per open file.
The buffer will only use memory for data that is downloaded but not yet
read.
If the buffer is empty, only a small amount of memory will be used.
.PP
The maximum memory used by rclone for buffering can be up to
\f[V]--buffer-size * open files\f[R].
.SS VFS File Caching
.PP
These flags control the VFS file caching options.
File caching is necessary to make the VFS layer appear compatible with a
normal file system.
It can be disabled at the cost of some compatibility.
.PP
For example you\[aq]ll need to enable VFS caching if you want to read
and write simultaneously to a file.
See below for more details.
.PP
Note that the VFS cache is separate from the cache backend and you may
find that you need one or the other or both.
.IP
.nf
\f[C]
--cache-dir string Directory rclone will use for caching.
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
\f[R]
.fi
.PP
If run with \f[V]-vv\f[R] rclone will print the location of the file
cache.
The files are stored in the user cache file area which is OS dependent
but can be controlled with \f[V]--cache-dir\f[R] or setting the
appropriate environment variable.
.PP
The cache has 4 different modes selected by \f[V]--vfs-cache-mode\f[R].
The higher the cache mode the more compatible rclone becomes at the cost
of using disk space.
.PP
Note that files are written back to the remote only when they are closed
and if they haven\[aq]t been accessed for \f[V]--vfs-write-back\f[R]
seconds.
If rclone is quit or dies with files that haven\[aq]t been uploaded,
these will be uploaded next time rclone is run with the same flags.
.PP
If using \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] note that the cache may exceed
these quotas for two reasons.
Firstly because it is only checked every
\f[V]--vfs-cache-poll-interval\f[R].
Secondly because open files cannot be evicted from the cache.
When \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] is exceeded, rclone will attempt to
evict the least accessed files from the cache first.
rclone will start with files that haven\[aq]t been accessed for the
longest.
This cache flushing strategy is efficient and more relevant files are
likely to remain cached.
.PP
The \f[V]--vfs-cache-max-age\f[R] will evict files from the cache after
the set time since last access has passed; it is based on access time,
not on when the file was first added to the cache.
The default value of 1 hour will start evicting files from cache that
haven\[aq]t been accessed for 1 hour.
When a cached file is accessed the 1 hour timer is reset to 0 and will
wait for 1 more hour before evicting.
Specify the time with standard notation, s, m, h, d, w .
.PP
You \f[B]should not\f[R] run two copies of rclone using the same VFS
cache with the same or overlapping remotes if using
\f[V]--vfs-cache-mode > off\f[R].
This can potentially cause data corruption if you do.
You can work around this by giving each rclone its own cache hierarchy
with \f[V]--cache-dir\f[R].
You don\[aq]t need to worry about this if the remotes in use don\[aq]t
overlap.
.SS --vfs-cache-mode off
.PP
In this mode (the default) the cache will read directly from the remote
and write directly to the remote without caching anything on disk.
.PP
This will mean some operations are not possible
.IP \[bu] 2
Files can\[aq]t be opened for both read AND write
.IP \[bu] 2
Files opened for write can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files open for read with O_TRUNC will be opened write only
.IP \[bu] 2
Files open for write only will behave as if O_TRUNC was supplied
.IP \[bu] 2
Open modes O_APPEND, O_TRUNC are ignored
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode minimal
.PP
This is very similar to \[dq]off\[dq] except that files opened for read
AND write will be buffered to disk.
This means that files opened for write will be a lot more compatible,
but uses the minimal disk space.
.PP
These operations are not possible
.IP \[bu] 2
Files opened for write only can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files opened for write only will ignore O_APPEND, O_TRUNC
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode writes
.PP
In this mode files opened for read only are still read directly from the
remote, write only and read/write files are buffered to disk first.
.PP
This mode should support all normal file system operations.
.PP
If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.
.SS --vfs-cache-mode full
.PP
In this mode all reads and writes are buffered to and from disk.
When data is read from the remote this is buffered to disk as well.
.PP
In this mode the files in the cache will be sparse files and rclone will
keep track of which bits of the files it has downloaded.
.PP
So if an application only reads the starts of each file, then rclone
will only buffer the start of the file.
These files will appear to be their full size in the cache, but they
will be sparse files with only the data that has been downloaded present
in them.
.PP
This mode should support all normal file system operations and is
otherwise identical to \f[V]--vfs-cache-mode\f[R] writes.
.PP
When reading a file rclone will read \f[V]--buffer-size\f[R] plus
\f[V]--vfs-read-ahead\f[R] bytes ahead.
The \f[V]--buffer-size\f[R] is buffered in memory whereas the
\f[V]--vfs-read-ahead\f[R] is buffered on disk.
.PP
When using this mode it is recommended that \f[V]--buffer-size\f[R] is
not set too large and \f[V]--vfs-read-ahead\f[R] is set large if
required.
.PP
\f[B]IMPORTANT\f[R] not all file systems support sparse files.
In particular FAT/exFAT do not.
Rclone will perform very badly if the cache directory is on a filesystem
which doesn\[aq]t support sparse files and it will log an ERROR message
if one is detected.
.SS Fingerprinting
.PP
Various parts of the VFS use fingerprinting to see if a local file copy
has changed relative to a remote file.
Fingerprints are made from:
.IP \[bu] 2
size
.IP \[bu] 2
modification time
.IP \[bu] 2
hash
.PP
where available on an object.
.PP
On some backends some of these attributes are slow to read (they take an
extra API call per object, or extra work per object).
.PP
For example \f[V]hash\f[R] is slow with the \f[V]local\f[R] and
\f[V]sftp\f[R] backends as they have to read the entire file and hash
it, and \f[V]modtime\f[R] is slow with the \f[V]s3\f[R],
\f[V]swift\f[R], \f[V]ftp\f[R] and \f[V]qinqstor\f[R] backends because
they need to do an extra API call to fetch it.
.PP
If you use the \f[V]--vfs-fast-fingerprint\f[R] flag then rclone will
not include the slow operations in the fingerprint.
This makes the fingerprinting less accurate but much faster and will
improve the opening time of cached files.
.PP
If you are running a vfs cache over \f[V]local\f[R], \f[V]s3\f[R] or
\f[V]swift\f[R] backends then using this flag is recommended.
.PP
Note that if you change the value of this flag, the fingerprints of the
files in the cache may be invalidated and the files will need to be
downloaded again.
.SS VFS Chunked Reading
.PP
When rclone reads files from a remote it reads them in chunks.
This means that rather than requesting the whole file rclone reads the
chunk specified.
This can reduce the used download quota for some remotes by requesting
only chunks from the remote that are actually read, at the cost of an
increased number of requests.
.PP
These flags control the chunking:
.IP
.nf
\f[C]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
--vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
\f[R]
.fi
.PP
The chunking behaves differently depending on the
\f[V]--vfs-read-chunk-streams\f[R] parameter.
.SS \f[V]--vfs-read-chunk-streams\f[R] == 0
.PP
Rclone will start reading a chunk of size
\f[V]--vfs-read-chunk-size\f[R], and then double the size for each read.
When \f[V]--vfs-read-chunk-size-limit\f[R] is specified, and greater
than \f[V]--vfs-read-chunk-size\f[R], the chunk size for each open file
will get doubled only until the specified value is reached.
If the value is \[dq]off\[dq], which is the default, the limit is
disabled and the chunk size will grow indefinitely.
.PP
With \f[V]--vfs-read-chunk-size 100M\f[R] and
\f[V]--vfs-read-chunk-size-limit 0\f[R] the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on.
When \f[V]--vfs-read-chunk-size-limit 500M\f[R] is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.
.PP
Setting \f[V]--vfs-read-chunk-size\f[R] to \f[V]0\f[R] or \[dq]off\[dq]
disables chunked reading.
.PP
The chunks will not be buffered in memory.
.SS \f[V]--vfs-read-chunk-streams\f[R] > 0
.PP
Rclone reads \f[V]--vfs-read-chunk-streams\f[R] chunks of size
\f[V]--vfs-read-chunk-size\f[R] concurrently.
The size for each read will stay constant.
.PP
This improves performance massively on high latency links or very high
bandwidth links to high performance object stores.
.PP
Some experimentation will be needed to find the optimum values of
\f[V]--vfs-read-chunk-size\f[R] and \f[V]--vfs-read-chunk-streams\f[R]
as these will depend on the backend in use and the latency to the
backend.
.PP
For high performance object stores (eg AWS S3) a reasonable place to
start might be \f[V]--vfs-read-chunk-streams 16\f[R] and
\f[V]--vfs-read-chunk-size 4M\f[R].
In testing with AWS S3 the performance scaled roughly as the
\f[V]--vfs-read-chunk-streams\f[R] setting.
.PP
Similar settings should work for high latency links, but depending on
the latency they may need more \f[V]--vfs-read-chunk-streams\f[R] in
order to get the throughput.
.SS VFS Performance
.PP
These flags may be used to enable/disable features of the VFS for
performance or other reasons.
See also the chunked reading feature.
.PP
In particular S3 and Swift benefit hugely from the
\f[V]--no-modtime\f[R] flag (or use \f[V]--use-server-modtime\f[R] for a
slightly different effect) as each read of the modification time takes a
transaction.
.IP
.nf
\f[C]
--no-checksum Don\[aq]t compare checksums on up/download.
--no-modtime Don\[aq]t read/write the modification time (can speed things up).
--no-seek Don\[aq]t allow seeking in files.
--read-only Only allow read-only access.
\f[R]
.fi
.PP
Sometimes rclone is delivered reads or writes out of order.
Rather than seeking rclone will wait a short time for the in sequence
read or write to come in.
These flags only come into effect when not using an on disk cache file.
.IP
.nf
\f[C]
--vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
When using VFS write caching (\f[V]--vfs-cache-mode\f[R] with value
writes or full), the global flag \f[V]--transfers\f[R] can be set to
adjust the number of parallel uploads of modified files from the cache
(the related global flag \f[V]--checkers\f[R] has no effect on the VFS).
.IP
.nf
\f[C]
--transfers int Number of file transfers to run in parallel (default 4)
\f[R]
.fi
.SS Symlinks
.PP
By default the VFS does not support symlinks.
However this may be enabled with either of the following flags:
.IP
.nf
\f[C]
--links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension.
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
\f[R]
.fi
.PP
As most cloud storage systems do not support symlinks directly, rclone
stores the symlink as a normal file with a special extension.
So a file which appears as a symlink \f[V]link-to-file.txt\f[R] would be
stored on cloud storage as \f[V]link-to-file.txt.rclonelink\f[R] and the
contents would be the path to the symlink destination.
.PP
Note that \f[V]--links\f[R] enables symlink translation globally in
rclone - this includes any backend which supports the concept (for
example the local backend).
\f[V]--vfs-links\f[R] just enables it for the VFS layer.
.PP
This scheme is compatible with that used by the local backend with the
--local-links flag (https://rclone.org/local/#symlinks-junction-points).
.PP
The \f[V]--vfs-links\f[R] flag has been designed for
\f[V]rclone mount\f[R], \f[V]rclone nfsmount\f[R] and
\f[V]rclone serve nfs\f[R].
.PP
It hasn\[aq]t been tested with the other \f[V]rclone serve\f[R] commands
yet.
.PP
A limitation of the current implementation is that it expects the caller
to resolve sub-symlinks.
For example given this directory tree
.IP
.nf
\f[C]
\&.
├── dir
│\ \ └── file.txt
└── linked-dir -> dir
\f[R]
.fi
.PP
The VFS will correctly resolve \f[V]linked-dir\f[R] but not
\f[V]linked-dir/file.txt\f[R].
This is not a problem for the tested commands but may be for other
commands.
.PP
\f[B]Note\f[R] that there is an outstanding issue with symlink support
issue #8245 (https://github.com/rclone/rclone/issues/8245) with
duplicate files being created when symlinks are moved into directories
where there is a file of the same name (or vice versa).
.SS VFS Case Sensitivity
.PP
Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.
.PP
File systems in modern Windows are case-insensitive but case-preserving:
although existing files can be opened using any case, the exact case
used to create the file is preserved and available for programs to
query.
It is not allowed for two files in the same directory to differ only by
case.
.PP
Usually file systems on macOS are case-insensitive.
It is possible to make macOS file systems case-sensitive but that is not
the default.
.PP
The \f[V]--vfs-case-insensitive\f[R] VFS flag controls how rclone
handles these two cases.
If its value is \[dq]false\[dq], rclone passes file names to the remote
as-is.
If the flag is \[dq]true\[dq] (or appears without a value on the command
line), rclone may perform a \[dq]fixup\[dq] as explained below.
.PP
The user may specify a file name to open/delete/rename/etc with a case
different than what is stored on the remote.
If an argument refers to an existing file with exactly the same name,
then the case of the existing file on the disk will be used.
However, if a file name with exactly the same name is not found but a
name differing only by case exists, rclone will transparently fixup the
name.
This fixup happens only when an existing file is requested.
Case sensitivity of file names created anew by rclone is controlled by
the underlying remote.
.PP
Note that case sensitivity of the operating system running rclone (the
target) may differ from case sensitivity of a file system presented by
rclone (the source).
The flag controls whether \[dq]fixup\[dq] is performed to satisfy the
target.
.PP
If the flag is not provided on the command line, then its default value
depends on the operating system where rclone runs: \[dq]true\[dq] on
Windows and macOS, \[dq]false\[dq] otherwise.
If the flag is provided without a value, then it is \[dq]true\[dq].
.PP
The \f[V]--no-unicode-normalization\f[R] flag controls whether a similar
\[dq]fixup\[dq] is performed for filenames that differ but are
canonically
equivalent (https://en.wikipedia.org/wiki/Unicode_equivalence) with
respect to unicode.
Unicode normalization can be particularly helpful for users of macOS,
which prefers form NFD instead of the NFC used by most other platforms.
It is therefore highly recommended to keep the default of
\f[V]false\f[R] on macOS, to avoid encoding compatibility issues.
.PP
In the (probably unlikely) event that a directory has multiple duplicate
filenames after applying case and unicode normalization, the
\f[V]--vfs-block-norm-dupes\f[R] flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory.
For this reason, it is recommended to leave this disabled if not needed.
However, macOS users may wish to consider using it, as otherwise, if a
remote directory contains both NFC and NFD versions of the same
filename, an odd situation will occur: both versions of the file will be
visible in the mount, and both will appear to be editable, however,
editing either version will actually result in only the NFD version
getting edited under the hood.
\f[V]--vfs-block- norm-dupes\f[R] prevents this confusion by detecting
this scenario, hiding the duplicates, and logging an error, similar to
how this is handled in \f[V]rclone sync\f[R].
.SS VFS Disk Options
.PP
This flag allows you to manually set the statistics about the filing
system.
It can be useful when those statistics cannot be read correctly
automatically.
.IP
.nf
\f[C]
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
\f[R]
.fi
.SS Alternate report of used bytes
.PP
Some backends, most notably S3, do not report the amount of bytes used.
If you need this information to be available when running \f[V]df\f[R]
on the filesystem, then pass the flag \f[V]--vfs-used-is-size\f[R] to
rclone.
With this flag set, instead of relying on the backend to report this
information, rclone will scan the whole remote similar to
\f[V]rclone size\f[R] and compute the total used space itself.
.PP
\f[B]WARNING\f[R]: Contrary to \f[V]rclone size\f[R], this flag ignores
filters so that the result is accurate.
However, this is very inefficient and may cost lots of API calls
resulting in extra charges.
Use it as a last resort and only with caching.
.SS VFS Metadata
.PP
If you use the \f[V]--vfs-metadata-extension\f[R] flag you can get the
VFS to expose files which contain the
metadata (https://rclone.org/docs/#metadata) as a JSON blob.
These files will not appear in the directory listing, but can be
\f[V]stat\f[R]-ed and opened and once they have been they \f[B]will\f[R]
appear in directory listings until the directory cache expires.
.PP
Note that some backends won\[aq]t create metadata unless you pass in the
\f[V]--metadata\f[R] flag.
.PP
For example, using \f[V]rclone mount\f[R] with
\f[V]--metadata --vfs-metadata-extension .metadata\f[R] we get
.IP
.nf
\f[C]
$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
$ cat /mnt/1G.metadata
{
\[dq]atime\[dq]: \[dq]2025-03-04T17:34:22.317069787Z\[dq],
\[dq]btime\[dq]: \[dq]2025-03-03T16:03:37.708253808Z\[dq],
\[dq]gid\[dq]: \[dq]1000\[dq],
\[dq]mode\[dq]: \[dq]100664\[dq],
\[dq]mtime\[dq]: \[dq]2025-03-03T16:03:39.640238323Z\[dq],
\[dq]uid\[dq]: \[dq]1000\[dq]
}
$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
-rw-rw-r-- 1 user user 185 Mar 3 16:03 1G.metadata
\f[R]
.fi
.PP
If the file has no metadata it will be returned as \f[V]{}\f[R] and if
there is an error reading the metadata the error will be returned as
\f[V]{\[dq]error\[dq]:\[dq]error string\[dq]}\f[R].
.IP
.nf
\f[C]
rclone serve docker [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--allow-idmap Allow id-mapped mounts (Linux 6.12+, mount2 only)
--allow-non-empty Allow mounting over a non-empty directory (not supported on Windows)
--allow-other Allow access to other users (not supported on Windows)
--allow-root Allow access to root user (not supported on Windows)
--async-read Use asynchronous reads (not supported on Windows) (default true)
--attr-timeout Duration Time for which file/directory attributes are cached (default 1s)
--base-dir string Base directory for volumes (default \[dq]/var/lib/docker-volumes/rclone\[dq])
--daemon Run mount in background and exit parent process (as background output is suppressed, use --log-file with --log-format=pid,... to monitor) (not supported on Windows)
--daemon-timeout Duration Time limit for rclone to respond to kernel (not supported on Windows) (default 0s)
--daemon-wait Duration Time to wait for ready mount from daemon (maximum time on Linux, constant sleep time on OSX/BSD) (not supported on Windows) (default 1m0s)
--debug-fuse Debug the FUSE internals - needs -v
--default-permissions Makes kernel enforce access control based on the file mode (not supported on Windows)
--devname string Set the device name - default is remote:path
--dir-cache-time Duration Time to cache directory entries for (default 5m0s)
--dir-perms FileMode Directory permissions (default 777)
--direct-io Use Direct IO, disables caching of data
--file-perms FileMode File permissions (default 666)
--forget-state Skip restoring previous state
--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 (not supported on Windows) (default 1000)
-h, --help help for docker
--link-perms FileMode Link permissions (default 666)
--max-read-ahead SizeSuffix The number of bytes that can be prefetched for sequential reads (not supported on Windows) (default 128Ki)
--mount-case-insensitive Tristate Tell the OS the mount is case insensitive (true) or sensitive (false) regardless of the backend (auto) (default unset)
--network-mode Mount as remote network drive, instead of fixed disk drive (supported on Windows only)
--no-checksum Don\[aq]t compare checksums on up/download
--no-modtime Don\[aq]t read/write the modification time (can speed things up)
--no-seek Don\[aq]t allow seeking in files
--no-spec Do not write spec file
--noappledouble Ignore Apple Double (._) and .DS_Store files (supported on OSX only) (default true)
--noapplexattr Ignore all \[dq]com.apple.*\[dq] extended attributes (supported on OSX only)
-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 and only on supported remotes (set 0 to disable) (default 1m0s)
--read-only Only allow read-only access
--socket-addr string Address <host:port> or absolute path (default: /run/docker/plugins/rclone.sock)
--socket-gid int GID for unix socket (default: current process GID) (default 1000)
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask FileMode Override the permission bits set by the filesystem (not supported on Windows) (default 002)
--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)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-case-insensitive If a file name not found, find a case insensitive match
--vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
--vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
--vfs-handle-caching Duration Time to keep file handle and downloaders alive after last close (default 5s)
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
--vfs-metadata-extension string Set the extension to read metadata from
--vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--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 (\[aq]off\[aq] is unlimited) (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
--volname string Set the volume name (supported on Windows and OSX only)
--write-back-cache Makes kernel buffer writes before sending them to rclone (without this, writethrough caching is used) (not supported on Windows)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone serve (https://rclone.org/commands/rclone_serve/) - Serve a
remote over a protocol.
.SH rclone serve ftp
.PP
Serve remote:path over FTP.
.SS Synopsis
.PP
Run a basic FTP server to serve a remote over FTP protocol.
This can be viewed with a FTP client or you can make a remote of type
FTP to read and write it.
.SS Server options
.PP
Use --addr to specify which IP address and port the server should listen
on, e.g.
--addr 1.2.3.4:8000 or --addr :8080 to listen to all IPs.
By default it only listens on localhost.
You can use port :0 to let the OS choose an available port.
.PP
If you set --addr to listen on a public or LAN accessible IP address
then using Authentication is advised - see the next section for info.
.SS Authentication
.PP
By default this will serve files without needing a login.
.PP
You can set a single username and password with the --user and --pass
flags.
.SS VFS - Virtual File System
.PP
This command uses the VFS layer.
This adapts the cloud storage objects that rclone uses into something
which looks much more like a disk filing system.
.PP
Cloud storage objects have lots of properties which aren\[aq]t like disk
files - you can\[aq]t extend them or write to the middle of them, so the
VFS layer has to deal with that.
Because there is no one right way of doing this there are various
options explained below.
.PP
The VFS layer also implements a directory cache - this caches info about
files and directories (but not the data) in memory.
.SS VFS Directory Cache
.PP
Using the \f[V]--dir-cache-time\f[R] flag, you can control how long a
directory should be considered up to date and not refreshed from the
backend.
Changes made through the VFS will appear immediately or invalidate the
cache.
.IP
.nf
\f[C]
--dir-cache-time duration Time to cache directory entries for (default 5m0s)
--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)
\f[R]
.fi
.PP
However, changes made directly on the cloud storage by the web interface
or a different copy of rclone will only be picked up once the directory
cache expires if the backend configured does not support polling for
changes.
If the backend supports polling, changes will be picked up within the
polling interval.
.PP
You can send a \f[V]SIGHUP\f[R] signal to rclone for it to flush all
directory caches, regardless of how old they are.
Assuming only one rclone instance is running, you can reset the cache
like this:
.IP
.nf
\f[C]
kill -SIGHUP $(pidof rclone)
\f[R]
.fi
.PP
If you configure rclone with a remote control then you can use rclone rc
to flush the whole directory cache:
.IP
.nf
\f[C]
rclone rc vfs/forget
\f[R]
.fi
.PP
Or individual files or directories:
.IP
.nf
\f[C]
rclone rc vfs/forget file=path/to/file dir=path/to/dir
\f[R]
.fi
.SS VFS File Buffering
.PP
The \f[V]--buffer-size\f[R] flag determines the amount of memory, that
will be used to buffer data in advance.
.PP
Each open file will try to keep the specified amount of data in memory
at all times.
The buffered data is bound to one open file and won\[aq]t be shared.
.PP
This flag is a upper limit for the used memory per open file.
The buffer will only use memory for data that is downloaded but not yet
read.
If the buffer is empty, only a small amount of memory will be used.
.PP
The maximum memory used by rclone for buffering can be up to
\f[V]--buffer-size * open files\f[R].
.SS VFS File Caching
.PP
These flags control the VFS file caching options.
File caching is necessary to make the VFS layer appear compatible with a
normal file system.
It can be disabled at the cost of some compatibility.
.PP
For example you\[aq]ll need to enable VFS caching if you want to read
and write simultaneously to a file.
See below for more details.
.PP
Note that the VFS cache is separate from the cache backend and you may
find that you need one or the other or both.
.IP
.nf
\f[C]
--cache-dir string Directory rclone will use for caching.
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
\f[R]
.fi
.PP
If run with \f[V]-vv\f[R] rclone will print the location of the file
cache.
The files are stored in the user cache file area which is OS dependent
but can be controlled with \f[V]--cache-dir\f[R] or setting the
appropriate environment variable.
.PP
The cache has 4 different modes selected by \f[V]--vfs-cache-mode\f[R].
The higher the cache mode the more compatible rclone becomes at the cost
of using disk space.
.PP
Note that files are written back to the remote only when they are closed
and if they haven\[aq]t been accessed for \f[V]--vfs-write-back\f[R]
seconds.
If rclone is quit or dies with files that haven\[aq]t been uploaded,
these will be uploaded next time rclone is run with the same flags.
.PP
If using \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] note that the cache may exceed
these quotas for two reasons.
Firstly because it is only checked every
\f[V]--vfs-cache-poll-interval\f[R].
Secondly because open files cannot be evicted from the cache.
When \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] is exceeded, rclone will attempt to
evict the least accessed files from the cache first.
rclone will start with files that haven\[aq]t been accessed for the
longest.
This cache flushing strategy is efficient and more relevant files are
likely to remain cached.
.PP
The \f[V]--vfs-cache-max-age\f[R] will evict files from the cache after
the set time since last access has passed; it is based on access time,
not on when the file was first added to the cache.
The default value of 1 hour will start evicting files from cache that
haven\[aq]t been accessed for 1 hour.
When a cached file is accessed the 1 hour timer is reset to 0 and will
wait for 1 more hour before evicting.
Specify the time with standard notation, s, m, h, d, w .
.PP
You \f[B]should not\f[R] run two copies of rclone using the same VFS
cache with the same or overlapping remotes if using
\f[V]--vfs-cache-mode > off\f[R].
This can potentially cause data corruption if you do.
You can work around this by giving each rclone its own cache hierarchy
with \f[V]--cache-dir\f[R].
You don\[aq]t need to worry about this if the remotes in use don\[aq]t
overlap.
.SS --vfs-cache-mode off
.PP
In this mode (the default) the cache will read directly from the remote
and write directly to the remote without caching anything on disk.
.PP
This will mean some operations are not possible
.IP \[bu] 2
Files can\[aq]t be opened for both read AND write
.IP \[bu] 2
Files opened for write can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files open for read with O_TRUNC will be opened write only
.IP \[bu] 2
Files open for write only will behave as if O_TRUNC was supplied
.IP \[bu] 2
Open modes O_APPEND, O_TRUNC are ignored
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode minimal
.PP
This is very similar to \[dq]off\[dq] except that files opened for read
AND write will be buffered to disk.
This means that files opened for write will be a lot more compatible,
but uses the minimal disk space.
.PP
These operations are not possible
.IP \[bu] 2
Files opened for write only can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files opened for write only will ignore O_APPEND, O_TRUNC
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode writes
.PP
In this mode files opened for read only are still read directly from the
remote, write only and read/write files are buffered to disk first.
.PP
This mode should support all normal file system operations.
.PP
If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.
.SS --vfs-cache-mode full
.PP
In this mode all reads and writes are buffered to and from disk.
When data is read from the remote this is buffered to disk as well.
.PP
In this mode the files in the cache will be sparse files and rclone will
keep track of which bits of the files it has downloaded.
.PP
So if an application only reads the starts of each file, then rclone
will only buffer the start of the file.
These files will appear to be their full size in the cache, but they
will be sparse files with only the data that has been downloaded present
in them.
.PP
This mode should support all normal file system operations and is
otherwise identical to \f[V]--vfs-cache-mode\f[R] writes.
.PP
When reading a file rclone will read \f[V]--buffer-size\f[R] plus
\f[V]--vfs-read-ahead\f[R] bytes ahead.
The \f[V]--buffer-size\f[R] is buffered in memory whereas the
\f[V]--vfs-read-ahead\f[R] is buffered on disk.
.PP
When using this mode it is recommended that \f[V]--buffer-size\f[R] is
not set too large and \f[V]--vfs-read-ahead\f[R] is set large if
required.
.PP
\f[B]IMPORTANT\f[R] not all file systems support sparse files.
In particular FAT/exFAT do not.
Rclone will perform very badly if the cache directory is on a filesystem
which doesn\[aq]t support sparse files and it will log an ERROR message
if one is detected.
.SS Fingerprinting
.PP
Various parts of the VFS use fingerprinting to see if a local file copy
has changed relative to a remote file.
Fingerprints are made from:
.IP \[bu] 2
size
.IP \[bu] 2
modification time
.IP \[bu] 2
hash
.PP
where available on an object.
.PP
On some backends some of these attributes are slow to read (they take an
extra API call per object, or extra work per object).
.PP
For example \f[V]hash\f[R] is slow with the \f[V]local\f[R] and
\f[V]sftp\f[R] backends as they have to read the entire file and hash
it, and \f[V]modtime\f[R] is slow with the \f[V]s3\f[R],
\f[V]swift\f[R], \f[V]ftp\f[R] and \f[V]qinqstor\f[R] backends because
they need to do an extra API call to fetch it.
.PP
If you use the \f[V]--vfs-fast-fingerprint\f[R] flag then rclone will
not include the slow operations in the fingerprint.
This makes the fingerprinting less accurate but much faster and will
improve the opening time of cached files.
.PP
If you are running a vfs cache over \f[V]local\f[R], \f[V]s3\f[R] or
\f[V]swift\f[R] backends then using this flag is recommended.
.PP
Note that if you change the value of this flag, the fingerprints of the
files in the cache may be invalidated and the files will need to be
downloaded again.
.SS VFS Chunked Reading
.PP
When rclone reads files from a remote it reads them in chunks.
This means that rather than requesting the whole file rclone reads the
chunk specified.
This can reduce the used download quota for some remotes by requesting
only chunks from the remote that are actually read, at the cost of an
increased number of requests.
.PP
These flags control the chunking:
.IP
.nf
\f[C]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
--vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
\f[R]
.fi
.PP
The chunking behaves differently depending on the
\f[V]--vfs-read-chunk-streams\f[R] parameter.
.SS \f[V]--vfs-read-chunk-streams\f[R] == 0
.PP
Rclone will start reading a chunk of size
\f[V]--vfs-read-chunk-size\f[R], and then double the size for each read.
When \f[V]--vfs-read-chunk-size-limit\f[R] is specified, and greater
than \f[V]--vfs-read-chunk-size\f[R], the chunk size for each open file
will get doubled only until the specified value is reached.
If the value is \[dq]off\[dq], which is the default, the limit is
disabled and the chunk size will grow indefinitely.
.PP
With \f[V]--vfs-read-chunk-size 100M\f[R] and
\f[V]--vfs-read-chunk-size-limit 0\f[R] the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on.
When \f[V]--vfs-read-chunk-size-limit 500M\f[R] is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.
.PP
Setting \f[V]--vfs-read-chunk-size\f[R] to \f[V]0\f[R] or \[dq]off\[dq]
disables chunked reading.
.PP
The chunks will not be buffered in memory.
.SS \f[V]--vfs-read-chunk-streams\f[R] > 0
.PP
Rclone reads \f[V]--vfs-read-chunk-streams\f[R] chunks of size
\f[V]--vfs-read-chunk-size\f[R] concurrently.
The size for each read will stay constant.
.PP
This improves performance massively on high latency links or very high
bandwidth links to high performance object stores.
.PP
Some experimentation will be needed to find the optimum values of
\f[V]--vfs-read-chunk-size\f[R] and \f[V]--vfs-read-chunk-streams\f[R]
as these will depend on the backend in use and the latency to the
backend.
.PP
For high performance object stores (eg AWS S3) a reasonable place to
start might be \f[V]--vfs-read-chunk-streams 16\f[R] and
\f[V]--vfs-read-chunk-size 4M\f[R].
In testing with AWS S3 the performance scaled roughly as the
\f[V]--vfs-read-chunk-streams\f[R] setting.
.PP
Similar settings should work for high latency links, but depending on
the latency they may need more \f[V]--vfs-read-chunk-streams\f[R] in
order to get the throughput.
.SS VFS Performance
.PP
These flags may be used to enable/disable features of the VFS for
performance or other reasons.
See also the chunked reading feature.
.PP
In particular S3 and Swift benefit hugely from the
\f[V]--no-modtime\f[R] flag (or use \f[V]--use-server-modtime\f[R] for a
slightly different effect) as each read of the modification time takes a
transaction.
.IP
.nf
\f[C]
--no-checksum Don\[aq]t compare checksums on up/download.
--no-modtime Don\[aq]t read/write the modification time (can speed things up).
--no-seek Don\[aq]t allow seeking in files.
--read-only Only allow read-only access.
\f[R]
.fi
.PP
Sometimes rclone is delivered reads or writes out of order.
Rather than seeking rclone will wait a short time for the in sequence
read or write to come in.
These flags only come into effect when not using an on disk cache file.
.IP
.nf
\f[C]
--vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
When using VFS write caching (\f[V]--vfs-cache-mode\f[R] with value
writes or full), the global flag \f[V]--transfers\f[R] can be set to
adjust the number of parallel uploads of modified files from the cache
(the related global flag \f[V]--checkers\f[R] has no effect on the VFS).
.IP
.nf
\f[C]
--transfers int Number of file transfers to run in parallel (default 4)
\f[R]
.fi
.SS Symlinks
.PP
By default the VFS does not support symlinks.
However this may be enabled with either of the following flags:
.IP
.nf
\f[C]
--links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension.
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
\f[R]
.fi
.PP
As most cloud storage systems do not support symlinks directly, rclone
stores the symlink as a normal file with a special extension.
So a file which appears as a symlink \f[V]link-to-file.txt\f[R] would be
stored on cloud storage as \f[V]link-to-file.txt.rclonelink\f[R] and the
contents would be the path to the symlink destination.
.PP
Note that \f[V]--links\f[R] enables symlink translation globally in
rclone - this includes any backend which supports the concept (for
example the local backend).
\f[V]--vfs-links\f[R] just enables it for the VFS layer.
.PP
This scheme is compatible with that used by the local backend with the
--local-links flag (https://rclone.org/local/#symlinks-junction-points).
.PP
The \f[V]--vfs-links\f[R] flag has been designed for
\f[V]rclone mount\f[R], \f[V]rclone nfsmount\f[R] and
\f[V]rclone serve nfs\f[R].
.PP
It hasn\[aq]t been tested with the other \f[V]rclone serve\f[R] commands
yet.
.PP
A limitation of the current implementation is that it expects the caller
to resolve sub-symlinks.
For example given this directory tree
.IP
.nf
\f[C]
\&.
├── dir
│\ \ └── file.txt
└── linked-dir -> dir
\f[R]
.fi
.PP
The VFS will correctly resolve \f[V]linked-dir\f[R] but not
\f[V]linked-dir/file.txt\f[R].
This is not a problem for the tested commands but may be for other
commands.
.PP
\f[B]Note\f[R] that there is an outstanding issue with symlink support
issue #8245 (https://github.com/rclone/rclone/issues/8245) with
duplicate files being created when symlinks are moved into directories
where there is a file of the same name (or vice versa).
.SS VFS Case Sensitivity
.PP
Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.
.PP
File systems in modern Windows are case-insensitive but case-preserving:
although existing files can be opened using any case, the exact case
used to create the file is preserved and available for programs to
query.
It is not allowed for two files in the same directory to differ only by
case.
.PP
Usually file systems on macOS are case-insensitive.
It is possible to make macOS file systems case-sensitive but that is not
the default.
.PP
The \f[V]--vfs-case-insensitive\f[R] VFS flag controls how rclone
handles these two cases.
If its value is \[dq]false\[dq], rclone passes file names to the remote
as-is.
If the flag is \[dq]true\[dq] (or appears without a value on the command
line), rclone may perform a \[dq]fixup\[dq] as explained below.
.PP
The user may specify a file name to open/delete/rename/etc with a case
different than what is stored on the remote.
If an argument refers to an existing file with exactly the same name,
then the case of the existing file on the disk will be used.
However, if a file name with exactly the same name is not found but a
name differing only by case exists, rclone will transparently fixup the
name.
This fixup happens only when an existing file is requested.
Case sensitivity of file names created anew by rclone is controlled by
the underlying remote.
.PP
Note that case sensitivity of the operating system running rclone (the
target) may differ from case sensitivity of a file system presented by
rclone (the source).
The flag controls whether \[dq]fixup\[dq] is performed to satisfy the
target.
.PP
If the flag is not provided on the command line, then its default value
depends on the operating system where rclone runs: \[dq]true\[dq] on
Windows and macOS, \[dq]false\[dq] otherwise.
If the flag is provided without a value, then it is \[dq]true\[dq].
.PP
The \f[V]--no-unicode-normalization\f[R] flag controls whether a similar
\[dq]fixup\[dq] is performed for filenames that differ but are
canonically
equivalent (https://en.wikipedia.org/wiki/Unicode_equivalence) with
respect to unicode.
Unicode normalization can be particularly helpful for users of macOS,
which prefers form NFD instead of the NFC used by most other platforms.
It is therefore highly recommended to keep the default of
\f[V]false\f[R] on macOS, to avoid encoding compatibility issues.
.PP
In the (probably unlikely) event that a directory has multiple duplicate
filenames after applying case and unicode normalization, the
\f[V]--vfs-block-norm-dupes\f[R] flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory.
For this reason, it is recommended to leave this disabled if not needed.
However, macOS users may wish to consider using it, as otherwise, if a
remote directory contains both NFC and NFD versions of the same
filename, an odd situation will occur: both versions of the file will be
visible in the mount, and both will appear to be editable, however,
editing either version will actually result in only the NFD version
getting edited under the hood.
\f[V]--vfs-block- norm-dupes\f[R] prevents this confusion by detecting
this scenario, hiding the duplicates, and logging an error, similar to
how this is handled in \f[V]rclone sync\f[R].
.SS VFS Disk Options
.PP
This flag allows you to manually set the statistics about the filing
system.
It can be useful when those statistics cannot be read correctly
automatically.
.IP
.nf
\f[C]
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
\f[R]
.fi
.SS Alternate report of used bytes
.PP
Some backends, most notably S3, do not report the amount of bytes used.
If you need this information to be available when running \f[V]df\f[R]
on the filesystem, then pass the flag \f[V]--vfs-used-is-size\f[R] to
rclone.
With this flag set, instead of relying on the backend to report this
information, rclone will scan the whole remote similar to
\f[V]rclone size\f[R] and compute the total used space itself.
.PP
\f[B]WARNING\f[R]: Contrary to \f[V]rclone size\f[R], this flag ignores
filters so that the result is accurate.
However, this is very inefficient and may cost lots of API calls
resulting in extra charges.
Use it as a last resort and only with caching.
.SS VFS Metadata
.PP
If you use the \f[V]--vfs-metadata-extension\f[R] flag you can get the
VFS to expose files which contain the
metadata (https://rclone.org/docs/#metadata) as a JSON blob.
These files will not appear in the directory listing, but can be
\f[V]stat\f[R]-ed and opened and once they have been they \f[B]will\f[R]
appear in directory listings until the directory cache expires.
.PP
Note that some backends won\[aq]t create metadata unless you pass in the
\f[V]--metadata\f[R] flag.
.PP
For example, using \f[V]rclone mount\f[R] with
\f[V]--metadata --vfs-metadata-extension .metadata\f[R] we get
.IP
.nf
\f[C]
$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
$ cat /mnt/1G.metadata
{
\[dq]atime\[dq]: \[dq]2025-03-04T17:34:22.317069787Z\[dq],
\[dq]btime\[dq]: \[dq]2025-03-03T16:03:37.708253808Z\[dq],
\[dq]gid\[dq]: \[dq]1000\[dq],
\[dq]mode\[dq]: \[dq]100664\[dq],
\[dq]mtime\[dq]: \[dq]2025-03-03T16:03:39.640238323Z\[dq],
\[dq]uid\[dq]: \[dq]1000\[dq]
}
$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
-rw-rw-r-- 1 user user 185 Mar 3 16:03 1G.metadata
\f[R]
.fi
.PP
If the file has no metadata it will be returned as \f[V]{}\f[R] and if
there is an error reading the metadata the error will be returned as
\f[V]{\[dq]error\[dq]:\[dq]error string\[dq]}\f[R].
.SS Auth Proxy
.PP
If you supply the parameter \f[V]--auth-proxy /path/to/program\f[R] then
rclone will use that program to generate backends on the fly which then
are used to authenticate incoming requests.
This uses a simple JSON based protocol with input on STDIN and output on
STDOUT.
.PP
\f[B]PLEASE NOTE:\f[R] \f[V]--auth-proxy\f[R] and
\f[V]--authorized-keys\f[R] cannot be used together, if
\f[V]--auth-proxy\f[R] is set the authorized keys option will be
ignored.
.PP
There is an example program
bin/test_proxy.py (https://github.com/rclone/rclone/blob/master/bin/test_proxy.py)
in the rclone source code.
.PP
The program\[aq]s job is to take a \f[V]user\f[R] and \f[V]pass\f[R] on
the input and turn those into the config for a backend on STDOUT in JSON
format.
This config will have any default parameters for the backend added, but
it won\[aq]t use configuration from environment variables or command
line options - it is the job of the proxy program to make a complete
config.
.PP
This config generated must have this extra parameter
.IP \[bu] 2
\f[V]_root\f[R] - root to use for the backend
.PP
And it may have these parameters
.IP \[bu] 2
\f[V]_obscure\f[R] - comma separated strings for parameters to obscure
.IP \[bu] 2
\f[V]_secret_access_key\f[R] - the secret for S3 access key auth (see
below)
.PP
If password authentication was used by the client, input to the proxy
process (on STDIN) would look similar to this:
.IP
.nf
\f[C]
{
\[dq]user\[dq]: \[dq]me\[dq],
\[dq]pass\[dq]: \[dq]mypassword\[dq],
\[dq]client_ip\[dq]: \[dq]192.168.1.1\[dq]
}
\f[R]
.fi
.PP
If public-key authentication was used by the client, input to the proxy
process (on STDIN) would look similar to this:
.IP
.nf
\f[C]
{
\[dq]user\[dq]: \[dq]me\[dq],
\[dq]public_key\[dq]: \[dq]AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf\[dq],
\[dq]client_ip\[dq]: \[dq]192.168.1.1\[dq]
}
\f[R]
.fi
.PP
If the client authenticated with an S3 access key
(\f[V]rclone serve s3\f[R]), the client never sends its secret, only a
signature made with it, so the input contains just the access key ID as
the \f[V]user\f[R] with no \f[V]pass\f[R] or \f[V]public_key\f[R]:
.IP
.nf
\f[C]
{
\[dq]user\[dq]: \[dq]AKIAIOSFODNN7EXAMPLE\[dq],
\[dq]client_ip\[dq]: \[dq]192.168.1.1\[dq]
}
\f[R]
.fi
.PP
In this case the program must look up the secret access key for that
access key ID and return it in the \f[V]_secret_access_key\f[R] field of
the output.
Rclone then uses that secret to verify the signature on the request,
refusing the request if it does not match.
This means the proxy program is the source of truth for both the
credentials and the backend they map to.
If the program does not return \f[V]_secret_access_key\f[R] or returns
it empty the request is refused.
.PP
The program\[aq]s answer for an access key ID is cached (see below) but
is checked with the program again after 5 minutes even if the access key
ID is in constant use, so revoking an access key ID in the program takes
effect within 5 minutes.
A rotated secret takes effect on the first request signed with it.
.PP
The \f[V]client_ip\f[R] key holds the IP address the client connected
from, without a port number.
It can be used to restrict logins to certain networks, or to log
authentication attempts centrally.
It is omitted if the client has no IP address, for example when
connecting over a unix socket.
Note that if rclone is behind a reverse proxy this will be the address
of the reverse proxy and not the original client.
.PP
And as an example return this on STDOUT
.IP
.nf
\f[C]
{
\[dq]type\[dq]: \[dq]sftp\[dq],
\[dq]_root\[dq]: \[dq]\[dq],
\[dq]_obscure\[dq]: \[dq]pass\[dq],
\[dq]user\[dq]: \[dq]me\[dq],
\[dq]pass\[dq]: \[dq]mypassword\[dq],
\[dq]host\[dq]: \[dq]sftp.example.com\[dq]
}
\f[R]
.fi
.PP
This would mean that an SFTP backend would be created on the fly for the
\f[V]user\f[R] and \f[V]pass\f[R]/\f[V]public_key\f[R] returned in the
output to the host given.
Note that since \f[V]_obscure\f[R] is set to \f[V]pass\f[R], rclone will
obscure the \f[V]pass\f[R] parameter before creating the backend (which
is required for sftp backends).
.PP
The program can manipulate the supplied \f[V]user\f[R] in any way, for
example to make proxy to many different sftp backends, you could make
the \f[V]user\f[R] be \f[V]user\[at]example.com\f[R] and then set the
\f[V]host\f[R] to \f[V]example.com\f[R] in the output and the user to
\f[V]user\f[R].
For security you\[aq]d probably want to restrict the \f[V]host\f[R] to a
limited list.
.PP
An internal cache of backends is keyed on the \f[V]user\f[R], the kind
of credential presented, a hash of the \f[V]pass\f[R] or
\f[V]public_key\f[R], and the \f[V]client_ip\f[R].
This means that if a user\[aq]s password or public-key changes, the
client connects from a new IP address, or the proxy returns different
config parameters (eg a rotated \f[V]api_key\f[R]), a fresh backend will
be created on the next request rather than the cached one being reused.
A backend created for a public key login is never reused for a password
login, so a public key cannot be sent as a password to skip the program.
.PP
A cached answer is checked with the program again after 5 minutes even
if the user is in constant use, so revoking a user in the program takes
effect within 5 minutes.
For \f[V]serve sftp\f[R] this applies to new logins - an existing
connection is not closed.
.PP
This can be used to build general purpose proxies to any kind of backend
that rclone supports.
.IP
.nf
\f[C]
rclone serve ftp remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--addr string IPaddress:Port or :Port to bind server to (default \[dq]localhost:2121\[dq])
--auth-proxy string A program to use to create the backend from the auth
--cert string TLS PEM key (concatenation of certificate and CA certificate)
--dir-cache-time Duration Time to cache directory entries for (default 5m0s)
--dir-perms FileMode Directory permissions (default 777)
--file-perms FileMode File permissions (default 666)
--gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
-h, --help help for ftp
--key string TLS PEM Private key
--link-perms FileMode Link permissions (default 666)
--no-checksum Don\[aq]t compare checksums on up/download
--no-modtime Don\[aq]t read/write the modification time (can speed things up)
--no-seek Don\[aq]t allow seeking in files
--pass string Password for authentication (empty value allow every password)
--passive-port string Passive port range to use (default \[dq]30000-32000\[dq])
--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)
--public-ip string Public IP address to advertise for passive connections
--read-only Only allow read-only access
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask FileMode Override the permission bits set by the filesystem (not supported on Windows) (default 002)
--user string User name for authentication (default \[dq]anonymous\[dq])
--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)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-case-insensitive If a file name not found, find a case insensitive match
--vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
--vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
--vfs-handle-caching Duration Time to keep file handle and downloaders alive after last close (default 5s)
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
--vfs-metadata-extension string Set the extension to read metadata from
--vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--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 (\[aq]off\[aq] is unlimited) (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone serve (https://rclone.org/commands/rclone_serve/) - Serve a
remote over a protocol.
.SH rclone serve http
.PP
Serve the remote over HTTP.
.SS Synopsis
.PP
Run a basic web server to serve a remote over HTTP.
This can be viewed in a web browser or you can make a remote of type
http read from it.
.PP
You can use the filter flags (e.g.
\f[V]--include\f[R], \f[V]--exclude\f[R]) to control what is served.
.PP
The server will log errors.
Use \f[V]-v\f[R] to see access logs.
.PP
\f[V]--bwlimit\f[R] will be respected for file transfers.
Use \f[V]--stats\f[R] to control the stats printing.
.SS Server options
.PP
Use \f[V]--addr\f[R] to specify which IP address and port the server
should listen on, eg \f[V]--addr 1.2.3.4:8000\f[R] or
\f[V]--addr :8080\f[R] to listen to all IPs.
By default it only listens on localhost.
You can use port :0 to let the OS choose an available port.
.PP
If you set \f[V]--addr\f[R] to listen on a public or LAN accessible IP
address then using Authentication is advised - see the next section for
info.
.PP
You can use a unix socket by setting the url to
\f[V]unix:///path/to/socket\f[R] or just by using an absolute path name.
.PP
\f[V]--addr\f[R] may be repeated to listen on multiple
IPs/ports/sockets.
Socket activation, described further below, can also be used to
accomplish the same.
.PP
\f[V]--server-read-timeout\f[R] and \f[V]--server-write-timeout\f[R] can
be used to control the timeouts on the server.
Note that this is the total time for a transfer.
.PP
\f[V]--max-header-bytes\f[R] controls the maximum number of bytes the
server will accept in the HTTP header.
.PP
\f[V]--response-header\f[R] can be used to set an HTTP header for all
responses, will overriding existing values.
The flag may be repeated to add multiple headers.
Use the format \f[V]Header-Name: value\f[R].
.PP
\f[V]--allow-origin\f[R] enables cross-origin (CORS) requests from
browsers by setting the \f[V]Access-Control-Allow-Origin\f[R] header on
every response to the origin given, e.g.
\f[V]--allow-origin https://app.example.com\f[R].
Browser CORS preflight OPTIONS requests are answered by rclone without
needing authentication as browsers never send credentials with them.
Setting this to \f[V]*\f[R] allows any origin which is a security risk
on an authenticated server.
.PP
\f[V]--baseurl\f[R] controls the URL prefix that rclone serves from.
By default rclone will serve from the root.
If you used \f[V]--baseurl \[dq]/rclone\[dq]\f[R] then rclone would
serve from a URL starting with \[dq]/rclone/\[dq].
This is useful if you wish to proxy rclone serve.
Rclone automatically inserts leading and trailing \[dq]/\[dq] on
\f[V]--baseurl\f[R], so \f[V]--baseurl \[dq]rclone\[dq]\f[R],
\f[V]--baseurl \[dq]/rclone\[dq]\f[R] and
\f[V]--baseurl \[dq]/rclone/\[dq]\f[R] are all treated identically.
.PP
\f[V]--disable-zip\f[R] may be set to disable the zipping download
option.
.SS Protocol
.PP
The server supports HTTP/1.1 and HTTP/2.
HTTP/2 is used automatically for TLS connections.
For non-TLS connections, HTTP/2 cleartext (h2c) is supported, allowing
HTTP/2 without encryption.
.SS TLS (SSL)
.PP
By default this will serve over http.
If you want you can serve over https.
You will need to supply the \f[V]--cert\f[R] and \f[V]--key\f[R] flags.
If you wish to do client side certificate validation then you will need
to supply \f[V]--client-ca\f[R] also.
.PP
When TLS is configured every listener given with \f[V]--addr\f[R] serves
TLS.
An individual listener can be prefixed with \f[V]http://\f[R] to serve
unencrypted HTTP on that address, or with \f[V]tls://\f[R] to state
explicitly that it must serve TLS.
Using a \f[V]tls://\f[R] address without \f[V]--cert\f[R] and
\f[V]--key\f[R] is an error.
.PP
\f[V]--cert\f[R] must be set to the path of a file containing either a
PEM encoded certificate, or a concatenation of that with the CA
certificate.
\f[V]--key\f[R] must be set to the path of a file with the PEM encoded
private key.
If setting \f[V]--client-ca\f[R], it should be set to the path of a file
with PEM encoded client certificate authority certificates.
.PP
\f[V]--min-tls-version\f[R] is minimum TLS version that is acceptable.
Valid values are \[dq]tls1.0\[dq], \[dq]tls1.1\[dq], \[dq]tls1.2\[dq]
and \[dq]tls1.3\[dq] (default \[dq]tls1.0\[dq]).
.SS Socket activation
.PP
Instead of the listening addresses specified above, rclone will listen
to all FDs passed by the service manager, if any (and ignore any
arguments passed by \f[V]--addr\f[R]).
.PP
This allows rclone to be a socket-activated service.
It can be configured with .socket and .service unit files as described
in
<https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html>.
.PP
Socket activation can be tested ad-hoc with the
\f[V]systemd-socket-activate\f[R]command
.IP
.nf
\f[C]
systemd-socket-activate -l 8000 -- rclone serve
\f[R]
.fi
.PP
This will socket-activate rclone on the first connection to port 8000
over TCP.
.SS Template
.PP
\f[V]--template\f[R] allows a user to specify a custom markup template
for HTTP and WebDAV serve functions.
The server exports the following markup to be used within the template
to server pages:
.PP
.TS
tab(@);
lw(22.6n) lw(24.7n) lw(22.6n).
T{
Parameter
T}@T{
Subparameter
T}@T{
Description
T}
_
T{
\&.Name
T}@T{
T}@T{
The full path of a file/directory.
T}
T{
\&.Title
T}@T{
T}@T{
Directory listing of \[aq].Name\[aq].
T}
T{
\&.Sort
T}@T{
T}@T{
The current sort used.
This is changeable via \[aq]?sort=\[aq] parameter.
Possible values: namedirfirst, name, size, time (default namedirfirst).
T}
T{
\&.Order
T}@T{
T}@T{
The current ordering used.
This is changeable via \[aq]?order=\[aq] parameter.
Possible values: asc, desc (default asc).
T}
T{
\&.Query
T}@T{
T}@T{
Currently unused.
T}
T{
\&.Path
T}@T{
T}@T{
The path of the directory from the root with leading and trailing
slashes, e.g.
\[aq]/dir/\[aq].
T}
T{
\&.IsRoot
T}@T{
T}@T{
Boolean for if this is the root directory.
T}
T{
\&.UpLink
T}@T{
T}@T{
The link to the parent directory.
T}
T{
\&.Static
T}@T{
T}@T{
Boolean for if the listing is being written as a static page by rclone
index.
T}
T{
\&.NumDirs
T}@T{
T}@T{
The number of directories in the listing.
T}
T{
\&.NumFiles
T}@T{
T}@T{
The number of files in the listing.
T}
T{
\&.TotalSize
T}@T{
T}@T{
The total size in bytes of the files in the listing.
T}
T{
\&.Breadcrumb
T}@T{
T}@T{
Allows for creating a relative navigation.
T}
T{
T}@T{
\&.Link
T}@T{
The link of the Text relative to the root.
T}
T{
T}@T{
\&.Text
T}@T{
The Name of the directory.
T}
T{
\&.Entries
T}@T{
T}@T{
Information about a specific file/directory.
T}
T{
T}@T{
\&.URL
T}@T{
The url of an entry.
T}
T{
T}@T{
\&.Leaf
T}@T{
Currently same as \[aq].URL\[aq] but intended to be just the name.
T}
T{
T}@T{
\&.IsDir
T}@T{
Boolean for if an entry is a directory or not.
T}
T{
T}@T{
\&.Size
T}@T{
Size in bytes of the entry.
T}
T{
T}@T{
\&.ModTime
T}@T{
The UTC timestamp of an entry.
T}
T{
T}@T{
\&.MimeType
T}@T{
The MIME type of an entry guessed from its name, or
\[aq]inode/directory\[aq].
T}
.TE
.PP
The server also makes the following functions available so that they can
be used within the template.
These functions help extend the options for dynamic rendering of HTML.
They can be used to render HTML based on specific conditions.
.PP
.TS
tab(@);
lw(35.0n) lw(35.0n).
T{
Function
T}@T{
Description
T}
_
T{
afterEpoch
T}@T{
Returns the time since the epoch for the given time.
T}
T{
contains
T}@T{
Checks whether a given substring is present or not in a given string.
T}
T{
hasPrefix
T}@T{
Checks whether the given string begins with the specified prefix.
T}
T{
hasSuffix
T}@T{
Checks whether the given string end with the specified suffix.
T}
.TE
.SS Authentication
.PP
By default this will serve files without needing a login.
.PP
You can either use an htpasswd file which can take lots of users, or set
a single username and password with the \f[V]--user\f[R] and
\f[V]--pass\f[R] flags.
.PP
Alternatively, you can have the reverse proxy manage authentication and
use the username provided in the configured header with
\f[V]--user-from-header\f[R] (e.g.,
\f[V]--user-from-header=x-remote-user\f[R]).
Ensure the proxy is trusted and headers cannot be spoofed, as
misconfiguration may lead to unauthorized access.
.PP
If either of the above authentication methods is not configured and
client certificates are required by the \f[V]--client-ca\f[R] flag
passed to the server, the client certificate common name will be
considered as the username.
.PP
Use \f[V]--htpasswd /path/to/htpasswd\f[R] to provide an htpasswd file.
This is in standard apache format and supports MD5, SHA1 and BCrypt for
basic authentication.
Bcrypt is recommended.
.PP
To create an htpasswd file:
.IP
.nf
\f[C]
touch htpasswd
htpasswd -B htpasswd user
htpasswd -B htpasswd anotherUser
\f[R]
.fi
.PP
Use the same hash format and cost for every entry in the file.
If the entries differ, the time taken to reject a wrong password can
reveal which usernames exist.
.PP
The password file can be updated while rclone is running.
.PP
When authentication is enabled every request must be authenticated,
including HTTP OPTIONS requests, as the answer to an OPTIONS request can
reveal whether a path exists.
Health checks or monitoring which use unauthenticated OPTIONS requests
will need to send credentials.
The exception is browser CORS preflight requests when
\f[V]--allow-origin\f[R] is set, which are answered without
authentication as browsers never send credentials with them.
.PP
Use \f[V]--realm\f[R] to set the authentication realm.
.PP
Use \f[V]--salt\f[R] to change the password hashing salt from the
default.
.SS VFS - Virtual File System
.PP
This command uses the VFS layer.
This adapts the cloud storage objects that rclone uses into something
which looks much more like a disk filing system.
.PP
Cloud storage objects have lots of properties which aren\[aq]t like disk
files - you can\[aq]t extend them or write to the middle of them, so the
VFS layer has to deal with that.
Because there is no one right way of doing this there are various
options explained below.
.PP
The VFS layer also implements a directory cache - this caches info about
files and directories (but not the data) in memory.
.SS VFS Directory Cache
.PP
Using the \f[V]--dir-cache-time\f[R] flag, you can control how long a
directory should be considered up to date and not refreshed from the
backend.
Changes made through the VFS will appear immediately or invalidate the
cache.
.IP
.nf
\f[C]
--dir-cache-time duration Time to cache directory entries for (default 5m0s)
--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)
\f[R]
.fi
.PP
However, changes made directly on the cloud storage by the web interface
or a different copy of rclone will only be picked up once the directory
cache expires if the backend configured does not support polling for
changes.
If the backend supports polling, changes will be picked up within the
polling interval.
.PP
You can send a \f[V]SIGHUP\f[R] signal to rclone for it to flush all
directory caches, regardless of how old they are.
Assuming only one rclone instance is running, you can reset the cache
like this:
.IP
.nf
\f[C]
kill -SIGHUP $(pidof rclone)
\f[R]
.fi
.PP
If you configure rclone with a remote control then you can use rclone rc
to flush the whole directory cache:
.IP
.nf
\f[C]
rclone rc vfs/forget
\f[R]
.fi
.PP
Or individual files or directories:
.IP
.nf
\f[C]
rclone rc vfs/forget file=path/to/file dir=path/to/dir
\f[R]
.fi
.SS VFS File Buffering
.PP
The \f[V]--buffer-size\f[R] flag determines the amount of memory, that
will be used to buffer data in advance.
.PP
Each open file will try to keep the specified amount of data in memory
at all times.
The buffered data is bound to one open file and won\[aq]t be shared.
.PP
This flag is a upper limit for the used memory per open file.
The buffer will only use memory for data that is downloaded but not yet
read.
If the buffer is empty, only a small amount of memory will be used.
.PP
The maximum memory used by rclone for buffering can be up to
\f[V]--buffer-size * open files\f[R].
.SS VFS File Caching
.PP
These flags control the VFS file caching options.
File caching is necessary to make the VFS layer appear compatible with a
normal file system.
It can be disabled at the cost of some compatibility.
.PP
For example you\[aq]ll need to enable VFS caching if you want to read
and write simultaneously to a file.
See below for more details.
.PP
Note that the VFS cache is separate from the cache backend and you may
find that you need one or the other or both.
.IP
.nf
\f[C]
--cache-dir string Directory rclone will use for caching.
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
\f[R]
.fi
.PP
If run with \f[V]-vv\f[R] rclone will print the location of the file
cache.
The files are stored in the user cache file area which is OS dependent
but can be controlled with \f[V]--cache-dir\f[R] or setting the
appropriate environment variable.
.PP
The cache has 4 different modes selected by \f[V]--vfs-cache-mode\f[R].
The higher the cache mode the more compatible rclone becomes at the cost
of using disk space.
.PP
Note that files are written back to the remote only when they are closed
and if they haven\[aq]t been accessed for \f[V]--vfs-write-back\f[R]
seconds.
If rclone is quit or dies with files that haven\[aq]t been uploaded,
these will be uploaded next time rclone is run with the same flags.
.PP
If using \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] note that the cache may exceed
these quotas for two reasons.
Firstly because it is only checked every
\f[V]--vfs-cache-poll-interval\f[R].
Secondly because open files cannot be evicted from the cache.
When \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] is exceeded, rclone will attempt to
evict the least accessed files from the cache first.
rclone will start with files that haven\[aq]t been accessed for the
longest.
This cache flushing strategy is efficient and more relevant files are
likely to remain cached.
.PP
The \f[V]--vfs-cache-max-age\f[R] will evict files from the cache after
the set time since last access has passed; it is based on access time,
not on when the file was first added to the cache.
The default value of 1 hour will start evicting files from cache that
haven\[aq]t been accessed for 1 hour.
When a cached file is accessed the 1 hour timer is reset to 0 and will
wait for 1 more hour before evicting.
Specify the time with standard notation, s, m, h, d, w .
.PP
You \f[B]should not\f[R] run two copies of rclone using the same VFS
cache with the same or overlapping remotes if using
\f[V]--vfs-cache-mode > off\f[R].
This can potentially cause data corruption if you do.
You can work around this by giving each rclone its own cache hierarchy
with \f[V]--cache-dir\f[R].
You don\[aq]t need to worry about this if the remotes in use don\[aq]t
overlap.
.SS --vfs-cache-mode off
.PP
In this mode (the default) the cache will read directly from the remote
and write directly to the remote without caching anything on disk.
.PP
This will mean some operations are not possible
.IP \[bu] 2
Files can\[aq]t be opened for both read AND write
.IP \[bu] 2
Files opened for write can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files open for read with O_TRUNC will be opened write only
.IP \[bu] 2
Files open for write only will behave as if O_TRUNC was supplied
.IP \[bu] 2
Open modes O_APPEND, O_TRUNC are ignored
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode minimal
.PP
This is very similar to \[dq]off\[dq] except that files opened for read
AND write will be buffered to disk.
This means that files opened for write will be a lot more compatible,
but uses the minimal disk space.
.PP
These operations are not possible
.IP \[bu] 2
Files opened for write only can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files opened for write only will ignore O_APPEND, O_TRUNC
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode writes
.PP
In this mode files opened for read only are still read directly from the
remote, write only and read/write files are buffered to disk first.
.PP
This mode should support all normal file system operations.
.PP
If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.
.SS --vfs-cache-mode full
.PP
In this mode all reads and writes are buffered to and from disk.
When data is read from the remote this is buffered to disk as well.
.PP
In this mode the files in the cache will be sparse files and rclone will
keep track of which bits of the files it has downloaded.
.PP
So if an application only reads the starts of each file, then rclone
will only buffer the start of the file.
These files will appear to be their full size in the cache, but they
will be sparse files with only the data that has been downloaded present
in them.
.PP
This mode should support all normal file system operations and is
otherwise identical to \f[V]--vfs-cache-mode\f[R] writes.
.PP
When reading a file rclone will read \f[V]--buffer-size\f[R] plus
\f[V]--vfs-read-ahead\f[R] bytes ahead.
The \f[V]--buffer-size\f[R] is buffered in memory whereas the
\f[V]--vfs-read-ahead\f[R] is buffered on disk.
.PP
When using this mode it is recommended that \f[V]--buffer-size\f[R] is
not set too large and \f[V]--vfs-read-ahead\f[R] is set large if
required.
.PP
\f[B]IMPORTANT\f[R] not all file systems support sparse files.
In particular FAT/exFAT do not.
Rclone will perform very badly if the cache directory is on a filesystem
which doesn\[aq]t support sparse files and it will log an ERROR message
if one is detected.
.SS Fingerprinting
.PP
Various parts of the VFS use fingerprinting to see if a local file copy
has changed relative to a remote file.
Fingerprints are made from:
.IP \[bu] 2
size
.IP \[bu] 2
modification time
.IP \[bu] 2
hash
.PP
where available on an object.
.PP
On some backends some of these attributes are slow to read (they take an
extra API call per object, or extra work per object).
.PP
For example \f[V]hash\f[R] is slow with the \f[V]local\f[R] and
\f[V]sftp\f[R] backends as they have to read the entire file and hash
it, and \f[V]modtime\f[R] is slow with the \f[V]s3\f[R],
\f[V]swift\f[R], \f[V]ftp\f[R] and \f[V]qinqstor\f[R] backends because
they need to do an extra API call to fetch it.
.PP
If you use the \f[V]--vfs-fast-fingerprint\f[R] flag then rclone will
not include the slow operations in the fingerprint.
This makes the fingerprinting less accurate but much faster and will
improve the opening time of cached files.
.PP
If you are running a vfs cache over \f[V]local\f[R], \f[V]s3\f[R] or
\f[V]swift\f[R] backends then using this flag is recommended.
.PP
Note that if you change the value of this flag, the fingerprints of the
files in the cache may be invalidated and the files will need to be
downloaded again.
.SS VFS Chunked Reading
.PP
When rclone reads files from a remote it reads them in chunks.
This means that rather than requesting the whole file rclone reads the
chunk specified.
This can reduce the used download quota for some remotes by requesting
only chunks from the remote that are actually read, at the cost of an
increased number of requests.
.PP
These flags control the chunking:
.IP
.nf
\f[C]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
--vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
\f[R]
.fi
.PP
The chunking behaves differently depending on the
\f[V]--vfs-read-chunk-streams\f[R] parameter.
.SS \f[V]--vfs-read-chunk-streams\f[R] == 0
.PP
Rclone will start reading a chunk of size
\f[V]--vfs-read-chunk-size\f[R], and then double the size for each read.
When \f[V]--vfs-read-chunk-size-limit\f[R] is specified, and greater
than \f[V]--vfs-read-chunk-size\f[R], the chunk size for each open file
will get doubled only until the specified value is reached.
If the value is \[dq]off\[dq], which is the default, the limit is
disabled and the chunk size will grow indefinitely.
.PP
With \f[V]--vfs-read-chunk-size 100M\f[R] and
\f[V]--vfs-read-chunk-size-limit 0\f[R] the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on.
When \f[V]--vfs-read-chunk-size-limit 500M\f[R] is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.
.PP
Setting \f[V]--vfs-read-chunk-size\f[R] to \f[V]0\f[R] or \[dq]off\[dq]
disables chunked reading.
.PP
The chunks will not be buffered in memory.
.SS \f[V]--vfs-read-chunk-streams\f[R] > 0
.PP
Rclone reads \f[V]--vfs-read-chunk-streams\f[R] chunks of size
\f[V]--vfs-read-chunk-size\f[R] concurrently.
The size for each read will stay constant.
.PP
This improves performance massively on high latency links or very high
bandwidth links to high performance object stores.
.PP
Some experimentation will be needed to find the optimum values of
\f[V]--vfs-read-chunk-size\f[R] and \f[V]--vfs-read-chunk-streams\f[R]
as these will depend on the backend in use and the latency to the
backend.
.PP
For high performance object stores (eg AWS S3) a reasonable place to
start might be \f[V]--vfs-read-chunk-streams 16\f[R] and
\f[V]--vfs-read-chunk-size 4M\f[R].
In testing with AWS S3 the performance scaled roughly as the
\f[V]--vfs-read-chunk-streams\f[R] setting.
.PP
Similar settings should work for high latency links, but depending on
the latency they may need more \f[V]--vfs-read-chunk-streams\f[R] in
order to get the throughput.
.SS VFS Performance
.PP
These flags may be used to enable/disable features of the VFS for
performance or other reasons.
See also the chunked reading feature.
.PP
In particular S3 and Swift benefit hugely from the
\f[V]--no-modtime\f[R] flag (or use \f[V]--use-server-modtime\f[R] for a
slightly different effect) as each read of the modification time takes a
transaction.
.IP
.nf
\f[C]
--no-checksum Don\[aq]t compare checksums on up/download.
--no-modtime Don\[aq]t read/write the modification time (can speed things up).
--no-seek Don\[aq]t allow seeking in files.
--read-only Only allow read-only access.
\f[R]
.fi
.PP
Sometimes rclone is delivered reads or writes out of order.
Rather than seeking rclone will wait a short time for the in sequence
read or write to come in.
These flags only come into effect when not using an on disk cache file.
.IP
.nf
\f[C]
--vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
When using VFS write caching (\f[V]--vfs-cache-mode\f[R] with value
writes or full), the global flag \f[V]--transfers\f[R] can be set to
adjust the number of parallel uploads of modified files from the cache
(the related global flag \f[V]--checkers\f[R] has no effect on the VFS).
.IP
.nf
\f[C]
--transfers int Number of file transfers to run in parallel (default 4)
\f[R]
.fi
.SS Symlinks
.PP
By default the VFS does not support symlinks.
However this may be enabled with either of the following flags:
.IP
.nf
\f[C]
--links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension.
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
\f[R]
.fi
.PP
As most cloud storage systems do not support symlinks directly, rclone
stores the symlink as a normal file with a special extension.
So a file which appears as a symlink \f[V]link-to-file.txt\f[R] would be
stored on cloud storage as \f[V]link-to-file.txt.rclonelink\f[R] and the
contents would be the path to the symlink destination.
.PP
Note that \f[V]--links\f[R] enables symlink translation globally in
rclone - this includes any backend which supports the concept (for
example the local backend).
\f[V]--vfs-links\f[R] just enables it for the VFS layer.
.PP
This scheme is compatible with that used by the local backend with the
--local-links flag (https://rclone.org/local/#symlinks-junction-points).
.PP
The \f[V]--vfs-links\f[R] flag has been designed for
\f[V]rclone mount\f[R], \f[V]rclone nfsmount\f[R] and
\f[V]rclone serve nfs\f[R].
.PP
It hasn\[aq]t been tested with the other \f[V]rclone serve\f[R] commands
yet.
.PP
A limitation of the current implementation is that it expects the caller
to resolve sub-symlinks.
For example given this directory tree
.IP
.nf
\f[C]
\&.
├── dir
│\ \ └── file.txt
└── linked-dir -> dir
\f[R]
.fi
.PP
The VFS will correctly resolve \f[V]linked-dir\f[R] but not
\f[V]linked-dir/file.txt\f[R].
This is not a problem for the tested commands but may be for other
commands.
.PP
\f[B]Note\f[R] that there is an outstanding issue with symlink support
issue #8245 (https://github.com/rclone/rclone/issues/8245) with
duplicate files being created when symlinks are moved into directories
where there is a file of the same name (or vice versa).
.SS VFS Case Sensitivity
.PP
Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.
.PP
File systems in modern Windows are case-insensitive but case-preserving:
although existing files can be opened using any case, the exact case
used to create the file is preserved and available for programs to
query.
It is not allowed for two files in the same directory to differ only by
case.
.PP
Usually file systems on macOS are case-insensitive.
It is possible to make macOS file systems case-sensitive but that is not
the default.
.PP
The \f[V]--vfs-case-insensitive\f[R] VFS flag controls how rclone
handles these two cases.
If its value is \[dq]false\[dq], rclone passes file names to the remote
as-is.
If the flag is \[dq]true\[dq] (or appears without a value on the command
line), rclone may perform a \[dq]fixup\[dq] as explained below.
.PP
The user may specify a file name to open/delete/rename/etc with a case
different than what is stored on the remote.
If an argument refers to an existing file with exactly the same name,
then the case of the existing file on the disk will be used.
However, if a file name with exactly the same name is not found but a
name differing only by case exists, rclone will transparently fixup the
name.
This fixup happens only when an existing file is requested.
Case sensitivity of file names created anew by rclone is controlled by
the underlying remote.
.PP
Note that case sensitivity of the operating system running rclone (the
target) may differ from case sensitivity of a file system presented by
rclone (the source).
The flag controls whether \[dq]fixup\[dq] is performed to satisfy the
target.
.PP
If the flag is not provided on the command line, then its default value
depends on the operating system where rclone runs: \[dq]true\[dq] on
Windows and macOS, \[dq]false\[dq] otherwise.
If the flag is provided without a value, then it is \[dq]true\[dq].
.PP
The \f[V]--no-unicode-normalization\f[R] flag controls whether a similar
\[dq]fixup\[dq] is performed for filenames that differ but are
canonically
equivalent (https://en.wikipedia.org/wiki/Unicode_equivalence) with
respect to unicode.
Unicode normalization can be particularly helpful for users of macOS,
which prefers form NFD instead of the NFC used by most other platforms.
It is therefore highly recommended to keep the default of
\f[V]false\f[R] on macOS, to avoid encoding compatibility issues.
.PP
In the (probably unlikely) event that a directory has multiple duplicate
filenames after applying case and unicode normalization, the
\f[V]--vfs-block-norm-dupes\f[R] flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory.
For this reason, it is recommended to leave this disabled if not needed.
However, macOS users may wish to consider using it, as otherwise, if a
remote directory contains both NFC and NFD versions of the same
filename, an odd situation will occur: both versions of the file will be
visible in the mount, and both will appear to be editable, however,
editing either version will actually result in only the NFD version
getting edited under the hood.
\f[V]--vfs-block- norm-dupes\f[R] prevents this confusion by detecting
this scenario, hiding the duplicates, and logging an error, similar to
how this is handled in \f[V]rclone sync\f[R].
.SS VFS Disk Options
.PP
This flag allows you to manually set the statistics about the filing
system.
It can be useful when those statistics cannot be read correctly
automatically.
.IP
.nf
\f[C]
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
\f[R]
.fi
.SS Alternate report of used bytes
.PP
Some backends, most notably S3, do not report the amount of bytes used.
If you need this information to be available when running \f[V]df\f[R]
on the filesystem, then pass the flag \f[V]--vfs-used-is-size\f[R] to
rclone.
With this flag set, instead of relying on the backend to report this
information, rclone will scan the whole remote similar to
\f[V]rclone size\f[R] and compute the total used space itself.
.PP
\f[B]WARNING\f[R]: Contrary to \f[V]rclone size\f[R], this flag ignores
filters so that the result is accurate.
However, this is very inefficient and may cost lots of API calls
resulting in extra charges.
Use it as a last resort and only with caching.
.SS VFS Metadata
.PP
If you use the \f[V]--vfs-metadata-extension\f[R] flag you can get the
VFS to expose files which contain the
metadata (https://rclone.org/docs/#metadata) as a JSON blob.
These files will not appear in the directory listing, but can be
\f[V]stat\f[R]-ed and opened and once they have been they \f[B]will\f[R]
appear in directory listings until the directory cache expires.
.PP
Note that some backends won\[aq]t create metadata unless you pass in the
\f[V]--metadata\f[R] flag.
.PP
For example, using \f[V]rclone mount\f[R] with
\f[V]--metadata --vfs-metadata-extension .metadata\f[R] we get
.IP
.nf
\f[C]
$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
$ cat /mnt/1G.metadata
{
\[dq]atime\[dq]: \[dq]2025-03-04T17:34:22.317069787Z\[dq],
\[dq]btime\[dq]: \[dq]2025-03-03T16:03:37.708253808Z\[dq],
\[dq]gid\[dq]: \[dq]1000\[dq],
\[dq]mode\[dq]: \[dq]100664\[dq],
\[dq]mtime\[dq]: \[dq]2025-03-03T16:03:39.640238323Z\[dq],
\[dq]uid\[dq]: \[dq]1000\[dq]
}
$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
-rw-rw-r-- 1 user user 185 Mar 3 16:03 1G.metadata
\f[R]
.fi
.PP
If the file has no metadata it will be returned as \f[V]{}\f[R] and if
there is an error reading the metadata the error will be returned as
\f[V]{\[dq]error\[dq]:\[dq]error string\[dq]}\f[R].
.SS Auth Proxy
.PP
If you supply the parameter \f[V]--auth-proxy /path/to/program\f[R] then
rclone will use that program to generate backends on the fly which then
are used to authenticate incoming requests.
This uses a simple JSON based protocol with input on STDIN and output on
STDOUT.
.PP
\f[B]PLEASE NOTE:\f[R] \f[V]--auth-proxy\f[R] and
\f[V]--authorized-keys\f[R] cannot be used together, if
\f[V]--auth-proxy\f[R] is set the authorized keys option will be
ignored.
.PP
There is an example program
bin/test_proxy.py (https://github.com/rclone/rclone/blob/master/bin/test_proxy.py)
in the rclone source code.
.PP
The program\[aq]s job is to take a \f[V]user\f[R] and \f[V]pass\f[R] on
the input and turn those into the config for a backend on STDOUT in JSON
format.
This config will have any default parameters for the backend added, but
it won\[aq]t use configuration from environment variables or command
line options - it is the job of the proxy program to make a complete
config.
.PP
This config generated must have this extra parameter
.IP \[bu] 2
\f[V]_root\f[R] - root to use for the backend
.PP
And it may have these parameters
.IP \[bu] 2
\f[V]_obscure\f[R] - comma separated strings for parameters to obscure
.IP \[bu] 2
\f[V]_secret_access_key\f[R] - the secret for S3 access key auth (see
below)
.PP
If password authentication was used by the client, input to the proxy
process (on STDIN) would look similar to this:
.IP
.nf
\f[C]
{
\[dq]user\[dq]: \[dq]me\[dq],
\[dq]pass\[dq]: \[dq]mypassword\[dq],
\[dq]client_ip\[dq]: \[dq]192.168.1.1\[dq]
}
\f[R]
.fi
.PP
If public-key authentication was used by the client, input to the proxy
process (on STDIN) would look similar to this:
.IP
.nf
\f[C]
{
\[dq]user\[dq]: \[dq]me\[dq],
\[dq]public_key\[dq]: \[dq]AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf\[dq],
\[dq]client_ip\[dq]: \[dq]192.168.1.1\[dq]
}
\f[R]
.fi
.PP
If the client authenticated with an S3 access key
(\f[V]rclone serve s3\f[R]), the client never sends its secret, only a
signature made with it, so the input contains just the access key ID as
the \f[V]user\f[R] with no \f[V]pass\f[R] or \f[V]public_key\f[R]:
.IP
.nf
\f[C]
{
\[dq]user\[dq]: \[dq]AKIAIOSFODNN7EXAMPLE\[dq],
\[dq]client_ip\[dq]: \[dq]192.168.1.1\[dq]
}
\f[R]
.fi
.PP
In this case the program must look up the secret access key for that
access key ID and return it in the \f[V]_secret_access_key\f[R] field of
the output.
Rclone then uses that secret to verify the signature on the request,
refusing the request if it does not match.
This means the proxy program is the source of truth for both the
credentials and the backend they map to.
If the program does not return \f[V]_secret_access_key\f[R] or returns
it empty the request is refused.
.PP
The program\[aq]s answer for an access key ID is cached (see below) but
is checked with the program again after 5 minutes even if the access key
ID is in constant use, so revoking an access key ID in the program takes
effect within 5 minutes.
A rotated secret takes effect on the first request signed with it.
.PP
The \f[V]client_ip\f[R] key holds the IP address the client connected
from, without a port number.
It can be used to restrict logins to certain networks, or to log
authentication attempts centrally.
It is omitted if the client has no IP address, for example when
connecting over a unix socket.
Note that if rclone is behind a reverse proxy this will be the address
of the reverse proxy and not the original client.
.PP
And as an example return this on STDOUT
.IP
.nf
\f[C]
{
\[dq]type\[dq]: \[dq]sftp\[dq],
\[dq]_root\[dq]: \[dq]\[dq],
\[dq]_obscure\[dq]: \[dq]pass\[dq],
\[dq]user\[dq]: \[dq]me\[dq],
\[dq]pass\[dq]: \[dq]mypassword\[dq],
\[dq]host\[dq]: \[dq]sftp.example.com\[dq]
}
\f[R]
.fi
.PP
This would mean that an SFTP backend would be created on the fly for the
\f[V]user\f[R] and \f[V]pass\f[R]/\f[V]public_key\f[R] returned in the
output to the host given.
Note that since \f[V]_obscure\f[R] is set to \f[V]pass\f[R], rclone will
obscure the \f[V]pass\f[R] parameter before creating the backend (which
is required for sftp backends).
.PP
The program can manipulate the supplied \f[V]user\f[R] in any way, for
example to make proxy to many different sftp backends, you could make
the \f[V]user\f[R] be \f[V]user\[at]example.com\f[R] and then set the
\f[V]host\f[R] to \f[V]example.com\f[R] in the output and the user to
\f[V]user\f[R].
For security you\[aq]d probably want to restrict the \f[V]host\f[R] to a
limited list.
.PP
An internal cache of backends is keyed on the \f[V]user\f[R], the kind
of credential presented, a hash of the \f[V]pass\f[R] or
\f[V]public_key\f[R], and the \f[V]client_ip\f[R].
This means that if a user\[aq]s password or public-key changes, the
client connects from a new IP address, or the proxy returns different
config parameters (eg a rotated \f[V]api_key\f[R]), a fresh backend will
be created on the next request rather than the cached one being reused.
A backend created for a public key login is never reused for a password
login, so a public key cannot be sent as a password to skip the program.
.PP
A cached answer is checked with the program again after 5 minutes even
if the user is in constant use, so revoking a user in the program takes
effect within 5 minutes.
For \f[V]serve sftp\f[R] this applies to new logins - an existing
connection is not closed.
.PP
This can be used to build general purpose proxies to any kind of backend
that rclone supports.
.IP
.nf
\f[C]
rclone serve http remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--addr stringArray IPaddress:Port or :Port to bind server to (default 127.0.0.1:8080)
--allow-origin string Origin which cross-domain request (CORS) can be executed from
--auth-proxy string A program to use to create the backend from the auth
--baseurl string Prefix for URLs - leave blank for root
--cert string TLS PEM key (concatenation of certificate and CA certificate)
--client-ca string Client certificate authority to verify clients with
--dir-cache-time Duration Time to cache directory entries for (default 5m0s)
--dir-perms FileMode Directory permissions (default 777)
--disable-dir-list Disable HTML directory list on GET request for a directory
--disable-zip Disable zip download of directories
--file-perms FileMode File permissions (default 666)
--gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
-h, --help help for http
--htpasswd string A htpasswd file - if not provided no authentication is done
--key string TLS PEM Private key
--link-perms FileMode Link permissions (default 666)
--max-header-bytes int Maximum size of request header (default 4096)
--min-tls-version string Minimum TLS version that is acceptable (default \[dq]tls1.0\[dq])
--no-checksum Don\[aq]t compare checksums on up/download
--no-modtime Don\[aq]t read/write the modification time (can speed things up)
--no-seek Don\[aq]t allow seeking in files
--pass string Password for authentication
--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)
--read-only Only allow read-only access
--realm string Realm for authentication
--response-header stringArray Set HTTP header for all responses, overriding existing values
--salt string Password hashing salt (default \[dq]dlPL2MqE\[dq])
--server-read-timeout Duration Timeout for server reading data (default 1h0m0s)
--server-write-timeout Duration Timeout for server writing data (default 1h0m0s)
--template string User-specified template
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask FileMode Override the permission bits set by the filesystem (not supported on Windows) (default 002)
--user string User name for authentication
--user-from-header string User name from a defined HTTP header
--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)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-case-insensitive If a file name not found, find a case insensitive match
--vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
--vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
--vfs-handle-caching Duration Time to keep file handle and downloaders alive after last close (default 5s)
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
--vfs-metadata-extension string Set the extension to read metadata from
--vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--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 (\[aq]off\[aq] is unlimited) (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone serve (https://rclone.org/commands/rclone_serve/) - Serve a
remote over a protocol.
.SH rclone serve nfs
.PP
Serve the remote as an NFS mount
.SS Synopsis
.PP
Create an NFS server that serves the given remote over the network.
.PP
This implements an NFSv3 server to serve any rclone remote via NFS.
.PP
The primary purpose for this command is to enable the mount
command (https://rclone.org/commands/rclone_mount/) on recent macOS
versions where installing FUSE is very cumbersome.
.PP
This server does not implement any authentication so any client will be
able to access the data.
To limit access, you can use \f[V]serve nfs\f[R] on the loopback address
or rely on secure tunnels (such as SSH) or use firewalling.
.PP
For this reason, by default, a random TCP port is chosen and the
loopback interface is used for the listening address by default; meaning
that it is only available to the local machine.
If you want other machines to access the NFS mount over local network,
you need to specify the listening address and port using the
\f[V]--addr\f[R] flag.
.PP
Modifying files through the NFS protocol requires VFS caching.
Usually you will need to specify \f[V]--vfs-cache-mode\f[R] in order to
be able to write to the mountpoint (\f[V]full\f[R] is recommended).
If you don\[aq]t specify VFS cache mode, the mount will be read-only.
.PP
\f[V]--nfs-cache-type\f[R] controls the type of the NFS handle cache.
By default this is \f[V]memory\f[R] where new handles will be randomly
allocated when needed.
These are stored in memory.
If the server is restarted the handle cache will be lost and connected
NFS clients will get stale handle errors.
.PP
\f[V]--nfs-cache-type disk\f[R] uses an on disk NFS handle cache.
Rclone hashes the path of the object and stores it in a file named after
the hash.
These hashes are stored on disk the directory controlled by
\f[V]--cache-dir\f[R] or the exact directory may be specified with
\f[V]--nfs-cache-dir\f[R].
Using this means that the NFS server can be restarted at will without
affecting the connected clients.
.PP
\f[V]--nfs-cache-type symlink\f[R] is similar to
\f[V]--nfs-cache-type disk\f[R] in that it uses an on disk cache, but
the cache entries are held as symlinks.
Rclone will use the handle of the underlying file as the NFS handle
which improves performance.
This sort of cache can\[aq]t be backed up and restored as the underlying
handles will change.
This is Linux only.
It requires running rclone as root or with
\f[V]CAP_DAC_READ_SEARCH\f[R].
You can run rclone with this extra permission by doing this to the
rclone binary
\f[V]sudo setcap cap_dac_read_search+ep /path/to/rclone\f[R].
.PP
\f[V]--nfs-cache-handle-limit\f[R] controls the maximum number of cached
NFS handles stored by the caching handler.
This should not be set too low or you may experience errors when trying
to access files.
The default is \f[V]1000000\f[R], but consider lowering this limit if
the server\[aq]s system resource usage causes problems.
This is only used by the \f[V]memory\f[R] type cache.
.PP
To serve NFS over the network use following command:
.IP
.nf
\f[C]
rclone serve nfs remote: --addr 0.0.0.0:$PORT --vfs-cache-mode=full
\f[R]
.fi
.PP
This specifies a port that can be used in the mount command.
To mount the server under Linux/macOS, use the following command:
.IP
.nf
\f[C]
mount -t nfs -o port=$PORT,mountport=$PORT,tcp $HOSTNAME:/ path/to/mountpoint
\f[R]
.fi
.PP
Where \f[V]$PORT\f[R] is the same port number used in the
\f[V]serve nfs\f[R] command and \f[V]$HOSTNAME\f[R] is the network
address of the machine that \f[V]serve nfs\f[R] was run on.
.PP
NFS clients can also mount a subdirectory of the served remote by
including it in the mount path.
For example to mount only the \f[V]photos/2024\f[R] subdirectory:
.IP
.nf
\f[C]
mount -t nfs -o port=$PORT,mountport=$PORT,tcp $HOSTNAME:/photos/2024 path/to/mountpoint
\f[R]
.fi
.PP
The subpath is resolved within the served remote and must refer to an
existing directory (not a file or a symlink).
Subpath mounts are a convenience equivalent to mounting \f[V]/\f[R] and
changing directory: they share access to the same underlying VFS and the
same file handles, so they do not isolate the client from siblings or
parents of the mounted subdirectory.
.PP
If \f[V]--vfs-metadata-extension\f[R] is in use then for the
\f[V]--nfs-cache-type disk\f[R] and \f[V]--nfs-cache-type cache\f[R] the
metadata files will have the file handle of their parent file suffixed
with \f[V]0x00, 0x00, 0x00, 0x01\f[R].
This means they can be looked up directly from the parent file handle is
desired.
.PP
This command is only available on Unix platforms.
.SS VFS - Virtual File System
.PP
This command uses the VFS layer.
This adapts the cloud storage objects that rclone uses into something
which looks much more like a disk filing system.
.PP
Cloud storage objects have lots of properties which aren\[aq]t like disk
files - you can\[aq]t extend them or write to the middle of them, so the
VFS layer has to deal with that.
Because there is no one right way of doing this there are various
options explained below.
.PP
The VFS layer also implements a directory cache - this caches info about
files and directories (but not the data) in memory.
.SS VFS Directory Cache
.PP
Using the \f[V]--dir-cache-time\f[R] flag, you can control how long a
directory should be considered up to date and not refreshed from the
backend.
Changes made through the VFS will appear immediately or invalidate the
cache.
.IP
.nf
\f[C]
--dir-cache-time duration Time to cache directory entries for (default 5m0s)
--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)
\f[R]
.fi
.PP
However, changes made directly on the cloud storage by the web interface
or a different copy of rclone will only be picked up once the directory
cache expires if the backend configured does not support polling for
changes.
If the backend supports polling, changes will be picked up within the
polling interval.
.PP
You can send a \f[V]SIGHUP\f[R] signal to rclone for it to flush all
directory caches, regardless of how old they are.
Assuming only one rclone instance is running, you can reset the cache
like this:
.IP
.nf
\f[C]
kill -SIGHUP $(pidof rclone)
\f[R]
.fi
.PP
If you configure rclone with a remote control then you can use rclone rc
to flush the whole directory cache:
.IP
.nf
\f[C]
rclone rc vfs/forget
\f[R]
.fi
.PP
Or individual files or directories:
.IP
.nf
\f[C]
rclone rc vfs/forget file=path/to/file dir=path/to/dir
\f[R]
.fi
.SS VFS File Buffering
.PP
The \f[V]--buffer-size\f[R] flag determines the amount of memory, that
will be used to buffer data in advance.
.PP
Each open file will try to keep the specified amount of data in memory
at all times.
The buffered data is bound to one open file and won\[aq]t be shared.
.PP
This flag is a upper limit for the used memory per open file.
The buffer will only use memory for data that is downloaded but not yet
read.
If the buffer is empty, only a small amount of memory will be used.
.PP
The maximum memory used by rclone for buffering can be up to
\f[V]--buffer-size * open files\f[R].
.SS VFS File Caching
.PP
These flags control the VFS file caching options.
File caching is necessary to make the VFS layer appear compatible with a
normal file system.
It can be disabled at the cost of some compatibility.
.PP
For example you\[aq]ll need to enable VFS caching if you want to read
and write simultaneously to a file.
See below for more details.
.PP
Note that the VFS cache is separate from the cache backend and you may
find that you need one or the other or both.
.IP
.nf
\f[C]
--cache-dir string Directory rclone will use for caching.
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
\f[R]
.fi
.PP
If run with \f[V]-vv\f[R] rclone will print the location of the file
cache.
The files are stored in the user cache file area which is OS dependent
but can be controlled with \f[V]--cache-dir\f[R] or setting the
appropriate environment variable.
.PP
The cache has 4 different modes selected by \f[V]--vfs-cache-mode\f[R].
The higher the cache mode the more compatible rclone becomes at the cost
of using disk space.
.PP
Note that files are written back to the remote only when they are closed
and if they haven\[aq]t been accessed for \f[V]--vfs-write-back\f[R]
seconds.
If rclone is quit or dies with files that haven\[aq]t been uploaded,
these will be uploaded next time rclone is run with the same flags.
.PP
If using \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] note that the cache may exceed
these quotas for two reasons.
Firstly because it is only checked every
\f[V]--vfs-cache-poll-interval\f[R].
Secondly because open files cannot be evicted from the cache.
When \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] is exceeded, rclone will attempt to
evict the least accessed files from the cache first.
rclone will start with files that haven\[aq]t been accessed for the
longest.
This cache flushing strategy is efficient and more relevant files are
likely to remain cached.
.PP
The \f[V]--vfs-cache-max-age\f[R] will evict files from the cache after
the set time since last access has passed; it is based on access time,
not on when the file was first added to the cache.
The default value of 1 hour will start evicting files from cache that
haven\[aq]t been accessed for 1 hour.
When a cached file is accessed the 1 hour timer is reset to 0 and will
wait for 1 more hour before evicting.
Specify the time with standard notation, s, m, h, d, w .
.PP
You \f[B]should not\f[R] run two copies of rclone using the same VFS
cache with the same or overlapping remotes if using
\f[V]--vfs-cache-mode > off\f[R].
This can potentially cause data corruption if you do.
You can work around this by giving each rclone its own cache hierarchy
with \f[V]--cache-dir\f[R].
You don\[aq]t need to worry about this if the remotes in use don\[aq]t
overlap.
.SS --vfs-cache-mode off
.PP
In this mode (the default) the cache will read directly from the remote
and write directly to the remote without caching anything on disk.
.PP
This will mean some operations are not possible
.IP \[bu] 2
Files can\[aq]t be opened for both read AND write
.IP \[bu] 2
Files opened for write can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files open for read with O_TRUNC will be opened write only
.IP \[bu] 2
Files open for write only will behave as if O_TRUNC was supplied
.IP \[bu] 2
Open modes O_APPEND, O_TRUNC are ignored
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode minimal
.PP
This is very similar to \[dq]off\[dq] except that files opened for read
AND write will be buffered to disk.
This means that files opened for write will be a lot more compatible,
but uses the minimal disk space.
.PP
These operations are not possible
.IP \[bu] 2
Files opened for write only can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files opened for write only will ignore O_APPEND, O_TRUNC
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode writes
.PP
In this mode files opened for read only are still read directly from the
remote, write only and read/write files are buffered to disk first.
.PP
This mode should support all normal file system operations.
.PP
If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.
.SS --vfs-cache-mode full
.PP
In this mode all reads and writes are buffered to and from disk.
When data is read from the remote this is buffered to disk as well.
.PP
In this mode the files in the cache will be sparse files and rclone will
keep track of which bits of the files it has downloaded.
.PP
So if an application only reads the starts of each file, then rclone
will only buffer the start of the file.
These files will appear to be their full size in the cache, but they
will be sparse files with only the data that has been downloaded present
in them.
.PP
This mode should support all normal file system operations and is
otherwise identical to \f[V]--vfs-cache-mode\f[R] writes.
.PP
When reading a file rclone will read \f[V]--buffer-size\f[R] plus
\f[V]--vfs-read-ahead\f[R] bytes ahead.
The \f[V]--buffer-size\f[R] is buffered in memory whereas the
\f[V]--vfs-read-ahead\f[R] is buffered on disk.
.PP
When using this mode it is recommended that \f[V]--buffer-size\f[R] is
not set too large and \f[V]--vfs-read-ahead\f[R] is set large if
required.
.PP
\f[B]IMPORTANT\f[R] not all file systems support sparse files.
In particular FAT/exFAT do not.
Rclone will perform very badly if the cache directory is on a filesystem
which doesn\[aq]t support sparse files and it will log an ERROR message
if one is detected.
.SS Fingerprinting
.PP
Various parts of the VFS use fingerprinting to see if a local file copy
has changed relative to a remote file.
Fingerprints are made from:
.IP \[bu] 2
size
.IP \[bu] 2
modification time
.IP \[bu] 2
hash
.PP
where available on an object.
.PP
On some backends some of these attributes are slow to read (they take an
extra API call per object, or extra work per object).
.PP
For example \f[V]hash\f[R] is slow with the \f[V]local\f[R] and
\f[V]sftp\f[R] backends as they have to read the entire file and hash
it, and \f[V]modtime\f[R] is slow with the \f[V]s3\f[R],
\f[V]swift\f[R], \f[V]ftp\f[R] and \f[V]qinqstor\f[R] backends because
they need to do an extra API call to fetch it.
.PP
If you use the \f[V]--vfs-fast-fingerprint\f[R] flag then rclone will
not include the slow operations in the fingerprint.
This makes the fingerprinting less accurate but much faster and will
improve the opening time of cached files.
.PP
If you are running a vfs cache over \f[V]local\f[R], \f[V]s3\f[R] or
\f[V]swift\f[R] backends then using this flag is recommended.
.PP
Note that if you change the value of this flag, the fingerprints of the
files in the cache may be invalidated and the files will need to be
downloaded again.
.SS VFS Chunked Reading
.PP
When rclone reads files from a remote it reads them in chunks.
This means that rather than requesting the whole file rclone reads the
chunk specified.
This can reduce the used download quota for some remotes by requesting
only chunks from the remote that are actually read, at the cost of an
increased number of requests.
.PP
These flags control the chunking:
.IP
.nf
\f[C]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
--vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
\f[R]
.fi
.PP
The chunking behaves differently depending on the
\f[V]--vfs-read-chunk-streams\f[R] parameter.
.SS \f[V]--vfs-read-chunk-streams\f[R] == 0
.PP
Rclone will start reading a chunk of size
\f[V]--vfs-read-chunk-size\f[R], and then double the size for each read.
When \f[V]--vfs-read-chunk-size-limit\f[R] is specified, and greater
than \f[V]--vfs-read-chunk-size\f[R], the chunk size for each open file
will get doubled only until the specified value is reached.
If the value is \[dq]off\[dq], which is the default, the limit is
disabled and the chunk size will grow indefinitely.
.PP
With \f[V]--vfs-read-chunk-size 100M\f[R] and
\f[V]--vfs-read-chunk-size-limit 0\f[R] the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on.
When \f[V]--vfs-read-chunk-size-limit 500M\f[R] is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.
.PP
Setting \f[V]--vfs-read-chunk-size\f[R] to \f[V]0\f[R] or \[dq]off\[dq]
disables chunked reading.
.PP
The chunks will not be buffered in memory.
.SS \f[V]--vfs-read-chunk-streams\f[R] > 0
.PP
Rclone reads \f[V]--vfs-read-chunk-streams\f[R] chunks of size
\f[V]--vfs-read-chunk-size\f[R] concurrently.
The size for each read will stay constant.
.PP
This improves performance massively on high latency links or very high
bandwidth links to high performance object stores.
.PP
Some experimentation will be needed to find the optimum values of
\f[V]--vfs-read-chunk-size\f[R] and \f[V]--vfs-read-chunk-streams\f[R]
as these will depend on the backend in use and the latency to the
backend.
.PP
For high performance object stores (eg AWS S3) a reasonable place to
start might be \f[V]--vfs-read-chunk-streams 16\f[R] and
\f[V]--vfs-read-chunk-size 4M\f[R].
In testing with AWS S3 the performance scaled roughly as the
\f[V]--vfs-read-chunk-streams\f[R] setting.
.PP
Similar settings should work for high latency links, but depending on
the latency they may need more \f[V]--vfs-read-chunk-streams\f[R] in
order to get the throughput.
.SS VFS Performance
.PP
These flags may be used to enable/disable features of the VFS for
performance or other reasons.
See also the chunked reading feature.
.PP
In particular S3 and Swift benefit hugely from the
\f[V]--no-modtime\f[R] flag (or use \f[V]--use-server-modtime\f[R] for a
slightly different effect) as each read of the modification time takes a
transaction.
.IP
.nf
\f[C]
--no-checksum Don\[aq]t compare checksums on up/download.
--no-modtime Don\[aq]t read/write the modification time (can speed things up).
--no-seek Don\[aq]t allow seeking in files.
--read-only Only allow read-only access.
\f[R]
.fi
.PP
Sometimes rclone is delivered reads or writes out of order.
Rather than seeking rclone will wait a short time for the in sequence
read or write to come in.
These flags only come into effect when not using an on disk cache file.
.IP
.nf
\f[C]
--vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
When using VFS write caching (\f[V]--vfs-cache-mode\f[R] with value
writes or full), the global flag \f[V]--transfers\f[R] can be set to
adjust the number of parallel uploads of modified files from the cache
(the related global flag \f[V]--checkers\f[R] has no effect on the VFS).
.IP
.nf
\f[C]
--transfers int Number of file transfers to run in parallel (default 4)
\f[R]
.fi
.SS Symlinks
.PP
By default the VFS does not support symlinks.
However this may be enabled with either of the following flags:
.IP
.nf
\f[C]
--links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension.
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
\f[R]
.fi
.PP
As most cloud storage systems do not support symlinks directly, rclone
stores the symlink as a normal file with a special extension.
So a file which appears as a symlink \f[V]link-to-file.txt\f[R] would be
stored on cloud storage as \f[V]link-to-file.txt.rclonelink\f[R] and the
contents would be the path to the symlink destination.
.PP
Note that \f[V]--links\f[R] enables symlink translation globally in
rclone - this includes any backend which supports the concept (for
example the local backend).
\f[V]--vfs-links\f[R] just enables it for the VFS layer.
.PP
This scheme is compatible with that used by the local backend with the
--local-links flag (https://rclone.org/local/#symlinks-junction-points).
.PP
The \f[V]--vfs-links\f[R] flag has been designed for
\f[V]rclone mount\f[R], \f[V]rclone nfsmount\f[R] and
\f[V]rclone serve nfs\f[R].
.PP
It hasn\[aq]t been tested with the other \f[V]rclone serve\f[R] commands
yet.
.PP
A limitation of the current implementation is that it expects the caller
to resolve sub-symlinks.
For example given this directory tree
.IP
.nf
\f[C]
\&.
├── dir
│\ \ └── file.txt
└── linked-dir -> dir
\f[R]
.fi
.PP
The VFS will correctly resolve \f[V]linked-dir\f[R] but not
\f[V]linked-dir/file.txt\f[R].
This is not a problem for the tested commands but may be for other
commands.
.PP
\f[B]Note\f[R] that there is an outstanding issue with symlink support
issue #8245 (https://github.com/rclone/rclone/issues/8245) with
duplicate files being created when symlinks are moved into directories
where there is a file of the same name (or vice versa).
.SS VFS Case Sensitivity
.PP
Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.
.PP
File systems in modern Windows are case-insensitive but case-preserving:
although existing files can be opened using any case, the exact case
used to create the file is preserved and available for programs to
query.
It is not allowed for two files in the same directory to differ only by
case.
.PP
Usually file systems on macOS are case-insensitive.
It is possible to make macOS file systems case-sensitive but that is not
the default.
.PP
The \f[V]--vfs-case-insensitive\f[R] VFS flag controls how rclone
handles these two cases.
If its value is \[dq]false\[dq], rclone passes file names to the remote
as-is.
If the flag is \[dq]true\[dq] (or appears without a value on the command
line), rclone may perform a \[dq]fixup\[dq] as explained below.
.PP
The user may specify a file name to open/delete/rename/etc with a case
different than what is stored on the remote.
If an argument refers to an existing file with exactly the same name,
then the case of the existing file on the disk will be used.
However, if a file name with exactly the same name is not found but a
name differing only by case exists, rclone will transparently fixup the
name.
This fixup happens only when an existing file is requested.
Case sensitivity of file names created anew by rclone is controlled by
the underlying remote.
.PP
Note that case sensitivity of the operating system running rclone (the
target) may differ from case sensitivity of a file system presented by
rclone (the source).
The flag controls whether \[dq]fixup\[dq] is performed to satisfy the
target.
.PP
If the flag is not provided on the command line, then its default value
depends on the operating system where rclone runs: \[dq]true\[dq] on
Windows and macOS, \[dq]false\[dq] otherwise.
If the flag is provided without a value, then it is \[dq]true\[dq].
.PP
The \f[V]--no-unicode-normalization\f[R] flag controls whether a similar
\[dq]fixup\[dq] is performed for filenames that differ but are
canonically
equivalent (https://en.wikipedia.org/wiki/Unicode_equivalence) with
respect to unicode.
Unicode normalization can be particularly helpful for users of macOS,
which prefers form NFD instead of the NFC used by most other platforms.
It is therefore highly recommended to keep the default of
\f[V]false\f[R] on macOS, to avoid encoding compatibility issues.
.PP
In the (probably unlikely) event that a directory has multiple duplicate
filenames after applying case and unicode normalization, the
\f[V]--vfs-block-norm-dupes\f[R] flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory.
For this reason, it is recommended to leave this disabled if not needed.
However, macOS users may wish to consider using it, as otherwise, if a
remote directory contains both NFC and NFD versions of the same
filename, an odd situation will occur: both versions of the file will be
visible in the mount, and both will appear to be editable, however,
editing either version will actually result in only the NFD version
getting edited under the hood.
\f[V]--vfs-block- norm-dupes\f[R] prevents this confusion by detecting
this scenario, hiding the duplicates, and logging an error, similar to
how this is handled in \f[V]rclone sync\f[R].
.SS VFS Disk Options
.PP
This flag allows you to manually set the statistics about the filing
system.
It can be useful when those statistics cannot be read correctly
automatically.
.IP
.nf
\f[C]
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
\f[R]
.fi
.SS Alternate report of used bytes
.PP
Some backends, most notably S3, do not report the amount of bytes used.
If you need this information to be available when running \f[V]df\f[R]
on the filesystem, then pass the flag \f[V]--vfs-used-is-size\f[R] to
rclone.
With this flag set, instead of relying on the backend to report this
information, rclone will scan the whole remote similar to
\f[V]rclone size\f[R] and compute the total used space itself.
.PP
\f[B]WARNING\f[R]: Contrary to \f[V]rclone size\f[R], this flag ignores
filters so that the result is accurate.
However, this is very inefficient and may cost lots of API calls
resulting in extra charges.
Use it as a last resort and only with caching.
.SS VFS Metadata
.PP
If you use the \f[V]--vfs-metadata-extension\f[R] flag you can get the
VFS to expose files which contain the
metadata (https://rclone.org/docs/#metadata) as a JSON blob.
These files will not appear in the directory listing, but can be
\f[V]stat\f[R]-ed and opened and once they have been they \f[B]will\f[R]
appear in directory listings until the directory cache expires.
.PP
Note that some backends won\[aq]t create metadata unless you pass in the
\f[V]--metadata\f[R] flag.
.PP
For example, using \f[V]rclone mount\f[R] with
\f[V]--metadata --vfs-metadata-extension .metadata\f[R] we get
.IP
.nf
\f[C]
$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
$ cat /mnt/1G.metadata
{
\[dq]atime\[dq]: \[dq]2025-03-04T17:34:22.317069787Z\[dq],
\[dq]btime\[dq]: \[dq]2025-03-03T16:03:37.708253808Z\[dq],
\[dq]gid\[dq]: \[dq]1000\[dq],
\[dq]mode\[dq]: \[dq]100664\[dq],
\[dq]mtime\[dq]: \[dq]2025-03-03T16:03:39.640238323Z\[dq],
\[dq]uid\[dq]: \[dq]1000\[dq]
}
$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
-rw-rw-r-- 1 user user 185 Mar 3 16:03 1G.metadata
\f[R]
.fi
.PP
If the file has no metadata it will be returned as \f[V]{}\f[R] and if
there is an error reading the metadata the error will be returned as
\f[V]{\[dq]error\[dq]:\[dq]error string\[dq]}\f[R].
.IP
.nf
\f[C]
rclone serve nfs remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--addr string IPaddress:Port or :Port to bind server to
--dir-cache-time Duration Time to cache directory entries for (default 5m0s)
--dir-perms FileMode Directory permissions (default 777)
--file-perms FileMode File permissions (default 666)
--gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
-h, --help help for nfs
--link-perms FileMode Link permissions (default 666)
--nfs-cache-dir string The directory the NFS handle cache will use if set
--nfs-cache-handle-limit int max file handles cached simultaneously (min 5) (default 1000000)
--nfs-cache-type memory|disk|symlink Type of NFS handle cache to use (default memory)
--no-checksum Don\[aq]t compare checksums on up/download
--no-modtime Don\[aq]t read/write the modification time (can speed things up)
--no-seek Don\[aq]t allow seeking in files
--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)
--read-only Only allow read-only access
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask FileMode Override the permission bits set by the filesystem (not supported on Windows) (default 002)
--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)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-case-insensitive If a file name not found, find a case insensitive match
--vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
--vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
--vfs-handle-caching Duration Time to keep file handle and downloaders alive after last close (default 5s)
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
--vfs-metadata-extension string Set the extension to read metadata from
--vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--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 (\[aq]off\[aq] is unlimited) (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone serve (https://rclone.org/commands/rclone_serve/) - Serve a
remote over a protocol.
.SH rclone serve restic
.PP
Serve the remote for restic\[aq]s REST API.
.SS Synopsis
.PP
Run a basic web server to serve a remote over restic\[aq]s REST backend
API over HTTP.
This allows restic to use rclone as a data storage mechanism for cloud
providers that restic does not support directly.
.PP
Restic (https://restic.net/) is a command-line program for doing
backups.
.PP
The server will log errors.
Use -v to see access logs.
.PP
\f[V]--bwlimit\f[R] will be respected for file transfers.
Use \f[V]--stats\f[R] to control the stats printing.
.SS Setting up rclone for use by restic
.PP
First set up a remote for your chosen cloud
provider (https://rclone.org/docs/#configure).
.PP
Once you have set up the remote, check it is working with, for example
\[dq]rclone lsd remote:\[dq].
You may have called the remote something other than \[dq]remote:\[dq] -
just substitute whatever you called it in the following instructions.
.PP
Now start the rclone restic server
.IP
.nf
\f[C]
rclone serve restic -v remote:backup
\f[R]
.fi
.PP
Where you can replace \[dq]backup\[dq] in the above by whatever path in
the remote you wish to use.
.PP
By default this will serve on \[dq]localhost:8080\[dq] you can change
this with use of the \f[V]--addr\f[R] flag.
.PP
You might wish to start this server on boot.
.PP
Adding \f[V]--cache-objects=false\f[R] will cause rclone to stop caching
objects returned from the List call.
Caching is normally desirable as it speeds up downloading objects, saves
transactions and uses very little memory.
.SS Setting up restic to use rclone
.PP
Now you can follow the restic
instructions (http://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#rest-server)
on setting up restic.
.PP
Note that you will need restic 0.8.2 or later to interoperate with
rclone.
.PP
For the example above you will want to use
\[dq]http://localhost:8080/\[dq] as the URL for the REST server.
.PP
For example:
.IP
.nf
\f[C]
$ export RESTIC_REPOSITORY=rest:http://localhost:8080/
$ 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
duration: 0:00
snapshot 45c8fdd8 saved
\f[R]
.fi
.SS Multiple repositories
.PP
Note that you can use the endpoint to host multiple repositories.
Do this by adding a directory name or path after the URL.
Note that these \f[B]must\f[R] end with /.
Eg
.IP
.nf
\f[C]
$ export RESTIC_REPOSITORY=rest:http://localhost:8080/user1repo/
# backup user1 stuff
$ export RESTIC_REPOSITORY=rest:http://localhost:8080/user2repo/
# backup user2 stuff
\f[R]
.fi
.SS Private repositories
.PP
The\f[V]--private-repos\f[R] flag can be used to limit users to
repositories starting with a path of \f[V]/<username>/\f[R].
.SS Server options
.PP
Use \f[V]--addr\f[R] to specify which IP address and port the server
should listen on, eg \f[V]--addr 1.2.3.4:8000\f[R] or
\f[V]--addr :8080\f[R] to listen to all IPs.
By default it only listens on localhost.
You can use port :0 to let the OS choose an available port.
.PP
If you set \f[V]--addr\f[R] to listen on a public or LAN accessible IP
address then using Authentication is advised - see the next section for
info.
.PP
You can use a unix socket by setting the url to
\f[V]unix:///path/to/socket\f[R] or just by using an absolute path name.
.PP
\f[V]--addr\f[R] may be repeated to listen on multiple
IPs/ports/sockets.
Socket activation, described further below, can also be used to
accomplish the same.
.PP
\f[V]--server-read-timeout\f[R] and \f[V]--server-write-timeout\f[R] can
be used to control the timeouts on the server.
Note that this is the total time for a transfer.
.PP
\f[V]--max-header-bytes\f[R] controls the maximum number of bytes the
server will accept in the HTTP header.
.PP
\f[V]--response-header\f[R] can be used to set an HTTP header for all
responses, will overriding existing values.
The flag may be repeated to add multiple headers.
Use the format \f[V]Header-Name: value\f[R].
.PP
\f[V]--allow-origin\f[R] enables cross-origin (CORS) requests from
browsers by setting the \f[V]Access-Control-Allow-Origin\f[R] header on
every response to the origin given, e.g.
\f[V]--allow-origin https://app.example.com\f[R].
Browser CORS preflight OPTIONS requests are answered by rclone without
needing authentication as browsers never send credentials with them.
Setting this to \f[V]*\f[R] allows any origin which is a security risk
on an authenticated server.
.PP
\f[V]--baseurl\f[R] controls the URL prefix that rclone serves from.
By default rclone will serve from the root.
If you used \f[V]--baseurl \[dq]/rclone\[dq]\f[R] then rclone would
serve from a URL starting with \[dq]/rclone/\[dq].
This is useful if you wish to proxy rclone serve.
Rclone automatically inserts leading and trailing \[dq]/\[dq] on
\f[V]--baseurl\f[R], so \f[V]--baseurl \[dq]rclone\[dq]\f[R],
\f[V]--baseurl \[dq]/rclone\[dq]\f[R] and
\f[V]--baseurl \[dq]/rclone/\[dq]\f[R] are all treated identically.
.PP
\f[V]--disable-zip\f[R] may be set to disable the zipping download
option.
.SS Protocol
.PP
The server supports HTTP/1.1 and HTTP/2.
HTTP/2 is used automatically for TLS connections.
For non-TLS connections, HTTP/2 cleartext (h2c) is supported, allowing
HTTP/2 without encryption.
.SS TLS (SSL)
.PP
By default this will serve over http.
If you want you can serve over https.
You will need to supply the \f[V]--cert\f[R] and \f[V]--key\f[R] flags.
If you wish to do client side certificate validation then you will need
to supply \f[V]--client-ca\f[R] also.
.PP
When TLS is configured every listener given with \f[V]--addr\f[R] serves
TLS.
An individual listener can be prefixed with \f[V]http://\f[R] to serve
unencrypted HTTP on that address, or with \f[V]tls://\f[R] to state
explicitly that it must serve TLS.
Using a \f[V]tls://\f[R] address without \f[V]--cert\f[R] and
\f[V]--key\f[R] is an error.
.PP
\f[V]--cert\f[R] must be set to the path of a file containing either a
PEM encoded certificate, or a concatenation of that with the CA
certificate.
\f[V]--key\f[R] must be set to the path of a file with the PEM encoded
private key.
If setting \f[V]--client-ca\f[R], it should be set to the path of a file
with PEM encoded client certificate authority certificates.
.PP
\f[V]--min-tls-version\f[R] is minimum TLS version that is acceptable.
Valid values are \[dq]tls1.0\[dq], \[dq]tls1.1\[dq], \[dq]tls1.2\[dq]
and \[dq]tls1.3\[dq] (default \[dq]tls1.0\[dq]).
.SS Socket activation
.PP
Instead of the listening addresses specified above, rclone will listen
to all FDs passed by the service manager, if any (and ignore any
arguments passed by \f[V]--addr\f[R]).
.PP
This allows rclone to be a socket-activated service.
It can be configured with .socket and .service unit files as described
in
<https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html>.
.PP
Socket activation can be tested ad-hoc with the
\f[V]systemd-socket-activate\f[R]command
.IP
.nf
\f[C]
systemd-socket-activate -l 8000 -- rclone serve
\f[R]
.fi
.PP
This will socket-activate rclone on the first connection to port 8000
over TCP.
.SS Authentication
.PP
By default this will serve files without needing a login.
.PP
You can either use an htpasswd file which can take lots of users, or set
a single username and password with the \f[V]--user\f[R] and
\f[V]--pass\f[R] flags.
.PP
Alternatively, you can have the reverse proxy manage authentication and
use the username provided in the configured header with
\f[V]--user-from-header\f[R] (e.g.,
\f[V]--user-from-header=x-remote-user\f[R]).
Ensure the proxy is trusted and headers cannot be spoofed, as
misconfiguration may lead to unauthorized access.
.PP
If either of the above authentication methods is not configured and
client certificates are required by the \f[V]--client-ca\f[R] flag
passed to the server, the client certificate common name will be
considered as the username.
.PP
Use \f[V]--htpasswd /path/to/htpasswd\f[R] to provide an htpasswd file.
This is in standard apache format and supports MD5, SHA1 and BCrypt for
basic authentication.
Bcrypt is recommended.
.PP
To create an htpasswd file:
.IP
.nf
\f[C]
touch htpasswd
htpasswd -B htpasswd user
htpasswd -B htpasswd anotherUser
\f[R]
.fi
.PP
Use the same hash format and cost for every entry in the file.
If the entries differ, the time taken to reject a wrong password can
reveal which usernames exist.
.PP
The password file can be updated while rclone is running.
.PP
When authentication is enabled every request must be authenticated,
including HTTP OPTIONS requests, as the answer to an OPTIONS request can
reveal whether a path exists.
Health checks or monitoring which use unauthenticated OPTIONS requests
will need to send credentials.
The exception is browser CORS preflight requests when
\f[V]--allow-origin\f[R] is set, which are answered without
authentication as browsers never send credentials with them.
.PP
Use \f[V]--realm\f[R] to set the authentication realm.
.PP
Use \f[V]--salt\f[R] to change the password hashing salt from the
default.
.IP
.nf
\f[C]
rclone serve restic remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--addr stringArray IPaddress:Port or :Port to bind server to (default 127.0.0.1:8080)
--allow-origin string Origin which cross-domain request (CORS) can be executed from
--append-only Disallow deletion of repository data
--baseurl string Prefix for URLs - leave blank for root
--cache-objects Cache listed objects (default true)
--cert string TLS PEM key (concatenation of certificate and CA certificate)
--client-ca string Client certificate authority to verify clients with
-h, --help help for restic
--htpasswd string A htpasswd file - if not provided no authentication is done
--key string TLS PEM Private key
--max-header-bytes int Maximum size of request header (default 4096)
--min-tls-version string Minimum TLS version that is acceptable (default \[dq]tls1.0\[dq])
--pass string Password for authentication
--private-repos Users can only access their private repo
--realm string Realm for authentication
--response-header stringArray Set HTTP header for all responses, overriding existing values
--salt string Password hashing salt (default \[dq]dlPL2MqE\[dq])
--server-read-timeout Duration Timeout for server reading data (default 1h0m0s)
--server-write-timeout Duration Timeout for server writing data (default 1h0m0s)
--stdio Run an HTTP2 server on stdin/stdout
--user string User name for authentication
--user-from-header string User name from a defined HTTP header
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone serve (https://rclone.org/commands/rclone_serve/) - Serve a
remote over a protocol.
.SH rclone serve s3
.PP
Serve remote:path over s3.
.SS Synopsis
.PP
\f[V]serve s3\f[R] implements a basic s3 server that serves a remote via
s3.
This can be viewed with an s3 client, or you can make an s3 type
remote (https://rclone.org/s3/) to read and write to it with rclone.
.PP
\f[V]serve s3\f[R] is considered \f[B]Experimental\f[R] so use with
care.
.PP
S3 server supports Signature Version 4 authentication.
Just use \f[V]--auth-key accessKey,secretKey\f[R] and set the
\f[V]Authorization\f[R] header correctly in the request.
(See the AWS
docs (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)).
.PP
\f[V]--auth-key\f[R] can be repeated for multiple auth pairs.
If \f[V]--auth-key\f[R] is not provided then \f[V]serve s3\f[R] will
allow anonymous access.
.PP
Alternatively \f[V]--auth-proxy\f[R] can be used to look up the secret
for each access key ID and choose the backend it maps to (see Auth Proxy
below).
When an auth proxy is in use \f[V]--auth-key\f[R] is ignored and every
request must be signed with the secret the proxy returns for its access
key ID.
Each access key ID is a separate user, whose multipart uploads and
object metadata are private to it, even if the proxy maps several access
key IDs to the same backend.
.PP
As on AWS, every \f[V]x-amz-*\f[R] header in an authenticated request
must be in its signed headers list; a request with an unsigned
\f[V]x-amz-*\f[R] header is refused with \f[V]AccessDenied\f[R].
S3 clients sign these headers as a matter of course, but a header added
after signing (for example by a proxy in front of the server, or
\f[V]x-amz-meta-*\f[R] headers sent with a presigned URL which only
signs the host) is refused.
.PP
Like all rclone flags \f[V]--auth-key\f[R] can be set via environment
variables, in this case \f[V]RCLONE_AUTH_KEY\f[R].
Since this flag can be repeated, the input to \f[V]RCLONE_AUTH_KEY\f[R]
is CSV encoded.
Because the \f[V]accessKey,secretKey\f[R] has a comma in, this means it
needs to be in quotes.
.IP
.nf
\f[C]
export RCLONE_AUTH_KEY=\[aq]\[dq]user,pass\[dq]\[aq]
rclone serve s3 ...
\f[R]
.fi
.PP
Or to supply multiple identities:
.IP
.nf
\f[C]
export RCLONE_AUTH_KEY=\[aq]\[dq]user1,pass1\[dq],\[dq]user2,pass2\[dq]\[aq]
rclone serve s3 ...
\f[R]
.fi
.PP
Setting this variable without quotes will produce an error.
.PP
Please note that some clients may require HTTPS endpoints.
See the SSL docs for more information.
.PP
This command uses the VFS directory cache.
All the functionality will work with \f[V]--vfs-cache-mode off\f[R].
Using \f[V]--vfs-cache-mode full\f[R] (or \f[V]writes\f[R]) can be used
to cache objects locally to improve performance.
.PP
Use \f[V]--force-path-style=false\f[R] if you want to use the bucket
name as a part of the hostname (such as mybucket.local)
.PP
Use \f[V]--etag-hash\f[R] if you want to change the hash uses for the
\f[V]ETag\f[R].
Note that using anything other than \f[V]MD5\f[R] (the default) is
likely to cause problems for S3 clients which rely on the Etag being the
MD5.
Use \f[V]--etag-hash auto\f[R] to use the best hash the backend supports
- with \f[V]--auth-proxy\f[R] that of each user\[aq]s backend.
.PP
The \f[V]ETag\f[R] of an object made by a multipart upload is its hash,
like any other object, rather than the \f[V]-N\f[R] suffixed
\f[V]ETag\f[R] AWS S3 gives these.
If the remote doesn\[aq]t have the MD5 of objects, \f[V]HeadObject\f[R]
and listings only return the MD5 of objects uploaded through
\f[V]serve s3\f[R] while the object\[aq]s metadata is kept (see below).
.SS Quickstart
.PP
For a simple set up, to serve \f[V]remote:path\f[R] over s3, run the
server like this:
.IP
.nf
\f[C]
rclone serve s3 --auth-key ACCESS_KEY_ID,SECRET_ACCESS_KEY remote:path
\f[R]
.fi
.PP
For example, to use a simple folder in the filesystem, run the server
with a command like this:
.IP
.nf
\f[C]
rclone serve s3 --auth-key ACCESS_KEY_ID,SECRET_ACCESS_KEY local:/path/to/folder
\f[R]
.fi
.PP
The \f[V]rclone.conf\f[R] for the server could look like this:
.IP
.nf
\f[C]
[local]
type = local
\f[R]
.fi
.PP
The \f[V]local\f[R] configuration is optional though.
If you run the server with a \f[V]remote:path\f[R] like
\f[V]/path/to/folder\f[R] (without the \f[V]local:\f[R] prefix and
without an \f[V]rclone.conf\f[R] file), rclone will fall back to a
default configuration, which will be visible as a warning in the logs.
But it will run nonetheless.
.PP
This will be compatible with an rclone (client) remote configuration
which is defined like this:
.IP
.nf
\f[C]
[serves3]
type = s3
provider = Rclone
endpoint = http://127.0.0.1:8080/
access_key_id = ACCESS_KEY_ID
secret_access_key = SECRET_ACCESS_KEY
\f[R]
.fi
.SS Object uploads (PUT)
.PP
A \f[V]PutObject\f[R] upload only ever changes the object at its key
atomically, on success, a failed or interrupted PUT neither removes nor
overwrites the object already stored at the key, and never leaves a
partial object visible at it.
.PP
Remotes that upload atomically (e.g.
object stores such as \f[V]s3\f[R]) are streamed straight to the
destination.
On remotes where a partial upload would otherwise be visible (e.g.
\f[V]local\f[R]), and whenever \f[V]--vfs-cache-mode\f[R] is
\f[V]writes\f[R] or above, the upload is written to a temporary object
that is renamed into place on success; these remotes need to support a
server-side move or copy for this (nearly all do - without move or copy
the upload is written directly and a failed PUT may leave a partial
object at the key).
If \f[V]serve s3\f[R] is killed part-way through an upload the temporary
object (named with a leading \f[V].rclone_temp_put_\f[R]) may be left
behind; it is hidden from S3 listings but must be removed manually.
.SS Multipart uploads
.PP
Multipart uploads are written, in part-number order, to a temporary
object which is renamed into place, server-side, on completion, so the
upload is atomic.
The object at the key only ever changes on a successful completion.
A failed or aborted upload never affects any object already stored under
that name and a partly-uploaded object never becomes visible under it.
.PP
With the default \f[V]--vfs-cache-mode off\f[R] \f[V]serve s3\f[R]
\f[B]streams\f[R] each multipart upload, in part-number order, into a
single streaming upload to the underlying remote, so the whole file is
never buffered in memory: only parts which arrive out of order are
buffered, within the limits described below.
The remote then performs its own internal upload (for example its own
multipart upload, still with bounded memory).
Remotes that don\[aq]t support streaming uploads (those that must know
the file size before the upload starts, such as \f[V]onedrive\f[R],
\f[V]pcloud\f[R], \f[V]jottacloud\f[R], \f[V]mailru\f[R],
\f[V]opendrive\f[R], \f[V]putio\f[R], \f[V]protondrive\f[R] and
\f[V]zoho\f[R]) have the parts spooled to a temporary file on \f[B]local
disk\f[R] instead, and uploaded with the size then known on completion,
so they need local disk space for the largest objects in flight rather
than memory.
.PP
With \f[V]--vfs-cache-mode writes\f[R] (or \f[V]full\f[R]) the parts are
written to a temporary file in the VFS cache and uploaded by the VFS
write-back - see Multipart uploads and the VFS cache below.
.PP
The rename into place needs the remote to support a server-side move or
copy, which nearly all do.
It is a cheap rename on most remotes, but on object stores without a
real rename (such as \f[V]s3\f[R] itself) the move is performed as a
server-side copy and delete of the whole object, which can take time and
API calls for large objects.
Concurrent multipart uploads of the same key (which S3 permits) are
safe.
Each writes its own temporary object and the last to complete wins.
.PP
On the few remotes that support neither server side move nor copy, the
parts are written straight to the destination object instead and never
buffered in memory.
This is at some cost in atomicity - the incomplete object is visible
under its final name while the upload is in flight, as it also is for a
plain object PUT on such remotes, and concurrent multipart uploads of
the same key write to the same object and can interleave.
A failed or aborted upload still leaves any pre-existing object
untouched provided the remote uploads atomically and the VFS cache is
off; on a remote where partial uploads are visible it may leave partial
data at the key (like a plain PUT there), and with
\f[V]--vfs-cache-mode writes\f[R] (or \f[V]full\f[R]) a write to the
cache cannot be abandoned, so an aborted upload\[aq]s partial data is
written back to the remote as if it had completed.
.PP
\f[B]Features\f[R]
.IP \[bu] 2
The whole object is never buffered in memory; only parts arriving out of
order are, within fixed limits, whatever the upload size.
.IP \[bu] 2
Parts can be any size.
Clients that don\[aq]t produce uniform-sized parts work fine - for
example PostgreSQL backup tools such as \f[B]pgBarman\f[R] and
\f[B]pgBackRest\f[R], which flush an upload buffer once it grows past
the chunk size, so each part is the chunk size plus a variable
overshoot.
.IP \[bu] 2
Works through \f[V]crypt\f[R] for any part size, since the object is
encrypted as one continuous stream.
.IP \[bu] 2
The destination object only ever changes atomically, on completion: an
aborted or failed upload leaves any pre-existing object of the same name
untouched, and a partly-uploaded object never becomes visible (except on
the few remotes with no server-side move or copy, as above).
.IP \[bu] 2
Multipart uploads go through the VFS like any other upload, so they show
in rclone\[aq]s transfer stats and obey \f[V]--bwlimit\f[R].
.IP \[bu] 2
Backend-agnostic - it only needs the remote to support a server-side
move or copy for the rename into place, which nearly all do; a remote
without streaming upload support spools to local disk as above.
.PP
\f[B]Limitations\f[R]
.IP \[bu] 2
Parts must arrive in ascending, contiguous part-number order (1, 2, 3,
\&...).
The part the stream needs next is written straight through as it
arrives, so it is never buffered, whatever its size.
Parts the client uploads concurrently or out of order are buffered until
their turn.
The memory used for this buffering is capped, per upload, by
\f[V]--multipart-streaming-buffer-limit\f[R] (default \f[V]256M\f[R],
\f[V]0\f[R] for no limit), and across all the uploads of each user (each
access key) by \f[V]--multipart-streaming-buffer-total\f[R] (default
\f[V]1G\f[R], \f[V]0\f[R] for no limit), counting each buffered part in
the whole 1 MiB memory pages it occupies: a part that would take the
buffer over either limit is stalled until the stream drains (or, if it
is bigger than the limits, until it is the next part), so a client that
uploads faster than the remote can accept sees backpressure rather than
unbounded server memory use.
A stalled part holds its HTTP request open, and one stalled for more
than a minute is failed with a \f[V]SlowDown\f[R] error, which S3
clients retry.
Clients whose upload concurrency times part size exceeds the limits will
see these stalls and retries when the remote is slower than the client.
Non-contiguous part numbers are rejected on completion.
Configure the client to upload in part order, ideally with low
concurrency, for the lowest memory use.
.IP \[bu] 2
A part uploaded again before completion - typically a client retrying
after a timeout - is accepted: if the earlier copy is still buffered it
is replaced, and if it has already been streamed an identical re-upload
is a no-op (a re-upload which arrives while the part is being streamed
waits for it to finish first).
If a part fails part way through being streamed (for example the
client\[aq]s connection drops) the client\[aq]s retry of it carries on
where it stopped, provided it has the same content.
What isn\[aq]t possible is replacing a part that has already been
streamed, in whole or in part, with \f[I]different\f[R] content - that
is rejected.
A part which arrives in full but is then rejected, for example because
it doesn\[aq]t match the \f[V]Content-MD5\f[R] the client declared, has
already been streamed, so the whole upload is failed and the client must
start it again.
So is a failure in the stream to the remote itself.
(The remote\[aq]s own upload still retries its internal chunks.)
.IP \[bu] 2
A \f[V]CompleteMultipartUpload\f[R] which fails because the parts it
lists don\[aq]t match those uploaded, or there is a gap in the part
numbers, leaves the upload open, as on S3, so the client can upload any
missing parts and complete it again.
If writing the completed object to the remote fails, the upload is
failed and must be started again.
.IP \[bu] 2
Parts are serialised into one stream, so ingest from the client is
effectively single-threaded.
When streaming, the remote\[aq]s own upload runs concurrently with the
parts arriving; with the local disk spool or the VFS cache the upload to
the remote only starts on completion.
.IP \[bu] 2
If \f[V]serve s3\f[R] is killed part-way through an upload the temporary
object (named with a leading \f[V].rclone_temp_multipart_\f[R]) may be
left behind; it is hidden from S3 listings but must be removed manually.
.SS Multipart uploads and the VFS cache
.PP
With \f[V]--vfs-cache-mode writes\f[R] (or \f[V]full\f[R]) multipart
uploads do not stream to the remote at all.
The parts are written, in part-number order, to a temporary file in the
VFS cache.
On completion the file is renamed into place and uploaded by the VFS
write-back, exactly like a plain object PUT.
This needs no streaming upload support from the remote.
The rename normally happens in the cache before the upload has started,
but the VFS requires the remote to support a server-side move or copy to
rename files at all (and uses one if the temporary file has already been
written back, e.g.
with \f[V]--vfs-write-back 0\f[R]).
On remotes without either, the parts are written to the cache directly
under the final key instead: the upload still never touches memory, but
it loses its atomicity - the in-flight upload is visible at the key, and
an aborted upload cannot be abandoned once in the cache, so its partial
data is written back to the remote as if it were a completed object.
.PP
Remotes that benefit from \f[V]--vfs-cache-mode writes\f[R]:
.IP \[bu] 2
\f[B]Remotes over slow or unreliable links.\f[R] A failure in a streamed
upload aborts the whole multipart upload and the client must start again
from the first part; a failed write-back upload is retried by the VFS
(see \f[V]--vfs-cache-max-age\f[R] and friends) without the client being
involved.
Ingest from the client also runs at local disk speed rather than being
throttled to the remote\[aq]s pace.
.IP \[bu] 2
\f[B]Workloads that read back or overwrite what they just wrote.\f[R]
The completed object stays in the cache, so subsequent
\f[V]GET\f[R]/\f[V]HEAD\f[R] requests are served locally, and plain PUTs
and multipart uploads to the same key go through the same cache entry so
the last write wins regardless of upload style.
.PP
The trade-offs of the VFS cache:
.IP \[bu] 2
The whole object lands on local disk, so the cache
(\f[V]--cache-dir\f[R]) needs space for the largest objects in flight;
\f[V]--vfs-cache-max-size\f[R] cannot evict files which are still being
uploaded.
.IP \[bu] 2
The \f[V]200 OK\f[R] for \f[V]CompleteMultipartUpload\f[R] means the
data is safely in the \f[B]local cache\f[R], not yet on the remote - the
same durability the cache gives plain PUTs.
If an acknowledgement must mean the data has reached the remote (for
example WAL archiving), use the default \f[V]--vfs-cache-mode off\f[R].
.IP \[bu] 2
The upload to the remote only starts on completion, rather than
overlapping with the parts arriving, so the data reaches the remote
later than with streaming.
.IP \[bu] 2
If \f[V]serve s3\f[R] is killed part-way through an upload, the
temporary file survives in the cache and the VFS cache recovery uploads
it to the remote on restart as a temporary object (named with a leading
\f[V].rclone_temp_multipart_\f[R]); as with the streaming path, it is
hidden from S3 listings but must be removed manually.
.SS Cleaning up temporary objects
.PP
If \f[V]serve s3\f[R] is killed part-way through an upload it can leave
a temporary object behind, named with a leading \f[V].rclone_temp_\f[R].
This whole prefix is reserved: any object whose name (the last
\f[V]/\f[R]-separated segment of its key) starts with
\f[V].rclone_temp_\f[R] is hidden from S3 listings, so don\[aq]t give
real objects such names - an existing object with such a name disappears
from listings (though it stays accessible directly by its key: only
listings hide reserved names, \f[V]GET\f[R], \f[V]HEAD\f[R] and
\f[V]DELETE\f[R] of the exact key still work).
A temporary object never holds acknowledged data - uploads whose
temporary object survived were never confirmed to the client - so old
ones are safe to delete:
.IP
.nf
\f[C]
rclone delete --min-age 24h --include \[dq].rclone_temp_*\[dq] remote:path
\f[R]
.fi
.PP
The \f[V]--min-age\f[R] protects uploads which are still in progress:
make sure it is longer than your longest upload, especially if several
\f[V]serve s3\f[R] instances share the same remote.
.PP
rclone v1.75 named its temporary multipart objects
\f[V].rclone_multipart_upload_*\f[R]; leftovers from an older server are
also hidden from listings and can be cleaned up the same way.
.SS Abandoned uploads
.PP
A client which starts a multipart upload and vanishes without either
completing or aborting it would otherwise hold on to its resources
forever.
.PP
An incomplete multipart upload which has had no activity for
\f[V]--multipart-expiry\f[R] (default \f[V]24h\f[R]) is therefore
aborted and cleaned up, exactly as if the client had called
\f[V]AbortMultipartUpload\f[R], and a \f[V]NOTICE\f[R] is logged.
.PP
An upload with a part still being received is never expired, however
slowly the part is arriving, and each completed part restarts the clock,
so the expiry only needs to outlast the client\[aq]s pauses
\f[I]between\f[R] parts, not the whole upload.
.PP
Late operations on an expired upload fail with \f[V]NoSuchUpload\f[R],
as they do on real S3 when a lifecycle rule has aborted the upload.
Set \f[V]--multipart-expiry 0\f[R] to keep incomplete uploads forever -
but note that abandoned uploads are then never cleaned up and go on
counting towards \f[V]--multipart-max-uploads\f[R] below, so enough of
them will stop the user starting any new multipart upload until the
server is restarted.
.PP
Each multipart upload in progress holds server resources - for example
the buffers the remote\[aq]s own upload uses once the first part has
arrived - so each user (each access key) can have no more than
\f[V]--multipart-max-uploads\f[R] (default \f[V]1000\f[R], \f[V]0\f[R]
for no limit) in progress at once.
Starting another fails with a \f[V]SlowDown\f[R] error, which S3 clients
retry, and a one-off \f[V]NOTICE\f[R] is logged.
.SS Disabling streaming
.PP
If you pass \f[V]--disable-multipart-streaming\f[R], multipart uploads
are instead \f[B]buffered in memory\f[R] by the underlying S3 library:
every part is held in memory and the whole object is written out in one
go when the upload completes.
This removes the in-order/contiguous-part restriction above, so parts
can be uploaded in any order, but \f[B]memory use grows with the size of
the upload\f[R], so it is only suitable for small objects.
A one-off \f[V]NOTICE\f[R] is logged the first time this happens.
This flag is the only thing that makes multipart uploads buffer in
memory - it is never done because of missing remote capabilities.
The limits on multipart uploads above
(\f[V]--multipart-streaming-buffer-limit\f[R],
\f[V]--multipart-streaming-buffer-total\f[R] and
\f[V]--multipart-max-uploads\f[R]) do not apply to uploads buffered in
memory, so don\[aq]t use this flag if the server is open to clients you
don\[aq]t trust.
Consider \f[V]--vfs-cache-mode writes\f[R] instead, which buffers the
upload in the VFS cache on disk and takes precedence over
\f[V]--disable-multipart-streaming\f[R].
.SS Memory use
.PP
\f[V]serve s3\f[R] never buffers whole objects in memory (except with
\f[V]--disable-multipart-streaming\f[R], above), and limits the memory
each kind of request can use, so that a client, even a hostile one,
can\[aq]t make it use unbounded memory.
.IP \[bu] 2
\f[B]Object data.\f[R] \f[V]PutObject\f[R] bodies and multipart parts
arriving in order are streamed straight through to the remote.
Parts arriving out of order are buffered, up to
\f[V]--multipart-streaming-buffer-limit\f[R] per upload and
\f[V]--multipart-streaming-buffer-total\f[R] per user.
.IP \[bu] 2
\f[B]Uploads in progress.\f[R] Each user can have at most
\f[V]--multipart-max-uploads\f[R] multipart uploads in progress.
An upload holds little memory until its first part arrives.
After that, with \f[V]--vfs-cache-mode off\f[R], it holds a
\f[V]--streaming-upload-cutoff\f[R] sized buffer plus whatever the
remote\[aq]s own upload buffers, which for many remotes is up to their
chunk size times their upload concurrency (for example
\f[V]--s3-chunk-size\f[R] times \f[V]--s3-upload-concurrency\f[R]).
Plain \f[V]PutObject\f[R] uploads use the same while they are in
progress.
.IP \[bu] 2
\f[B]Metadata.\f[R] The metadata of at most
\f[V]--metadata-max-objects\f[R] objects of each user is kept, each
limited to 2 KB.
.IP \[bu] 2
\f[B]Request bodies.\f[R] The XML bodies of requests such as
\f[V]CompleteMultipartUpload\f[R] and \f[V]DeleteObjects\f[R] are
limited to 10 MiB, and \f[V]DeleteObjects\f[R] to 1000 keys.
A browser form (\f[V]POST\f[R]) upload holds at most 1 MiB in memory,
spooling the rest to a temporary file, and is limited to 5 GB.
.IP \[bu] 2
\f[B]Listings.\f[R] Each page of a \f[V]ListObjects\f[R] listing reads
only the directories needed to fill it, and returns at most 1000 keys.
Directory listings are cached by the VFS directory cache.
.PP
The largest of these is usually the remote\[aq]s upload buffers, which
can be up to \f[V]--multipart-max-uploads\f[R] times the buffers of one
upload for each user if clients start many uploads and send part of
each.
The limits apply to each user separately, so that one user can\[aq]t
stop others uploading, which means the memory use grows with the number
of users.
To limit it, lower \f[V]--multipart-max-uploads\f[R], the remote\[aq]s
chunk size or upload concurrency, or set \f[V]--max-buffer-memory\f[R]
to limit the memory used by the buffers of all uploads to remotes which
use rclone\[aq]s buffer pool (including \f[V]s3\f[R],
\f[V]azureblob\f[R] and \f[V]b2\f[R]).
Buffered multipart parts come from the same pool, so if you set
\f[V]--max-buffer-memory\f[R] make it comfortably bigger than
\f[V]--multipart-streaming-buffer-total\f[R] times the number of users
uploading at once, otherwise buffered parts can use up all the memory
the remote needs to upload the parts which would free them.
.PP
The number of connections is not limited, so if the server is open to
clients you don\[aq]t trust, use \f[V]--auth-key\f[R] or
\f[V]--auth-proxy\f[R] and consider putting it behind a reverse proxy
which limits connections.
.SS Design goals
.PP
These goals explain many of the limitations below.
.IP \[bu] 2
\f[B]Objects are plain files on the remote.\f[R] A bucket is a directory
in the root and a key is a path in it, so the remote stays usable by
other tools, such as \f[V]rclone mount\f[R] or \f[V]rclone sync\f[R].
So keys must be paths (see Object names).
.IP \[bu] 2
\f[B]No database.\f[R] \f[V]serve s3\f[R] stores nothing but the
objects.
What the remote can\[aq]t hold, such as user metadata, tags, the MD5
\f[V]ETag\f[R] of an object on a remote without MD5 and the directory
markers put, is kept in memory as a best effort, and lost on restart.
.IP \[bu] 2
\f[B]Works with any rclone remote.\f[R] What \f[V]serve s3\f[R] can do
depends on what the remote supports, such as the hashes used for
\f[V]ETag\f[R]s and modification times, rather than needing a particular
backend.
.IP \[bu] 2
\f[B]Bounded memory.\f[R] Uploads, including multipart uploads, are
streamed to the remote and the memory each request can use is limited
(see Memory use).
Nothing is written to local disk unless the VFS cache is used or the
remote can\[aq]t stream uploads (see Multipart uploads).
.IP \[bu] 2
\f[B]Refuse rather than ignore.\f[R] Unsupported features are refused,
or answered as S3 answers when the feature isn\[aq]t configured, so a
client is never told something was done which wasn\[aq]t (see
Compatibility).
.IP \[bu] 2
\f[B]A storage gateway, not a full S3.\f[R] \f[V]serve s3\f[R]
implements the parts of the S3 API clients use to store and fetch
objects.
Versioning, ACLs, bucket policies, lifecycle rules and the like are out
of scope.
.IP \[bu] 2
\f[B]Compatible with rclone\[aq]s s3 backend.\f[R] This includes its
directory markers, which the tests check.
.SS Bugs
.PP
For a current list of \f[V]serve s3\f[R] bugs see the serve
s3 (https://github.com/rclone/rclone/labels/serve%20s3) bug category on
GitHub.
.SS Limitations
.PP
\f[V]serve s3\f[R] will treat all directories in the root as buckets and
ignore all files in the root.
You can use \f[V]CreateBucket\f[R] to create folders under the root, and
put a directory marker to create an empty folder below them (see Object
names).
.PP
When using \f[V]PutObject\f[R] or \f[V]DeleteObject\f[R], rclone will
automatically create or clean up empty folders.
If you don\[aq]t want to clean up empty folders automatically, use
\f[V]--directory-markers\f[R] (see Object names).
The deprecated \f[V]--no-cleanup\f[R] does the same.
.PP
When using \f[V]ListObjects\f[R] with the delimiter \f[V]/\f[R], rclone
lists the directory the prefix is in, showing its subdirectories as
common prefixes, including empty ones.
Without a delimiter the listing is recursive: rclone walks the directory
tree below the prefix, reading only as many directories as it needs to
fill each page, and lists empty directories as their directory markers
(see below).
Any other delimiter is supported too, but needs the whole directory tree
below the prefix walking, unless the delimiter is in the directory
names.
.PP
Versioning is not supported (see Design goals).
.PP
Conditional writes, \f[V]PutObject\f[R] and
\f[V]CompleteMultipartUpload\f[R] with \f[V]If-None-Match\f[R] or
\f[V]If-Match\f[R], are supported.
The conditions are checked before the object is written, and again as it
is moved into place when it is written to a temporary object first.
This happens for multipart uploads and, for \f[V]PutObject\f[R], with
remotes which can upload partial files (such as local disk) or with
\f[V]--vfs-cache-mode minimal\f[R] or above.
The second check is atomic against other writes through
\f[V]serve s3\f[R], but neither is atomic against changes made to the
remote some other way.
If the remote doesn\[aq]t support the \f[V]--etag-hash\f[R], objects
have no \f[V]ETag\f[R] so \f[V]If-Match\f[R] with an \f[V]ETag\f[R]
always fails.
.PP
Metadata will only be saved in memory (see Design goals) other than the
rclone \f[V]mtime\f[R] metadata which will be set as the modification
time of the file.
The metadata of at most \f[V]--metadata-max-objects\f[R] objects
(default \f[V]100000\f[R], \f[V]0\f[R] for no limit) of each user (each
access key) is kept; after that the metadata of the user\[aq]s least
recently used object is forgotten.
The metadata of an object is ignored once the object has been changed
some other way, for example by another \f[V]--auth-proxy\f[R] user or
directly on the backend.
Object tags are kept with the metadata in the same way.
.SS Object names
.PP
\f[V]serve s3\f[R] stores objects as files in the backend, so object
keys are mapped to file paths rather than treated as the opaque strings
AWS S3 allows.
Keys must be in canonical path form: keys that contain \f[V]..\f[R] or
\f[V].\f[R] path segments, repeated slashes (\f[V]//\f[R]), or a leading
slash are rejected with a \f[V]400 Bad Request\f[R]
(\f[V]InvalidArgument\f[R]) instead of being normalised, since
normalising them could alias two distinct keys to the same file or
resolve a key outside its bucket.
This matches the behaviour of other S3 servers such as MinIO.
.PP
A key ending in \f[V]/\f[R], such as \f[V]dir/\f[R], is a directory
marker, standing for the directory \f[V]dir\f[R].
Putting an empty directory marker creates the directory (one with data
is rejected with \f[V]400 Bad Request\f[R]), and deleting it removes the
directory if it is empty.
Directory markers are found by \f[V]HeadObject\f[R], \f[V]GetObject\f[R]
and \f[V]CopyObject\f[R] for any directory, but only the markers of
empty directories, and of the directories a marker was put for, are
listed as objects, as other directories may not have been made by
putting a marker.
The markers put are remembered in memory with the metadata (see
Limitations), so after a restart, or once forgotten, the marker of a
directory holding other keys is no longer listed.
While a marker is remembered its directory isn\[aq]t removed when the
last key below it is deleted.
.PP
With \f[V]--directory-markers\f[R] every directory is listed as a
directory marker, so the markers are listed after a restart too, as
needed by clients which rely on them, such as rclone\[aq]s s3 backend
with \f[V]--s3-directory-markers\f[R].
As every directory has a marker, a directory isn\[aq]t removed when the
last key below it is deleted.
Deleting the marker of a directory which holds other keys stops it being
listed, and the directory is then removed with the last key below it,
but this is only remembered in memory, like the markers put without
\f[V]--directory-markers\f[R].
.PP
As keys are file paths, a key can\[aq]t be both an object and a
directory holding other objects, for example \f[V]a/b\f[R] and
\f[V]a/b/c\f[R].
Writing an object which would need this fails with
\f[V]400 Bad Request\f[R] (\f[V]InvalidRequest\f[R]).
.SS Compatibility
.PP
\f[V]serve s3\f[R] implements the parts of the S3 API that S3 clients
commonly use to store and fetch objects.
Features it doesn\[aq]t support are refused with
\f[V]501 NotImplemented\f[R], or answered as AWS S3 answers for a bucket
without that feature configured, rather than being silently ignored.
.PP
.TS
tab(@);
lw(23.3n) lw(30.0n) lw(16.7n).
T{
Feature
T}@T{
Supported
T}@T{
Notes
T}
_
T{
\f[V]ListBuckets\f[R], \f[V]CreateBucket\f[R], \f[V]DeleteBucket\f[R],
\f[V]HeadBucket\f[R], \f[V]GetBucketLocation\f[R]
T}@T{
Yes
T}@T{
Buckets are the directories in the root of the remote.
T}
T{
\f[V]ListObjects\f[R], \f[V]ListObjectsV2\f[R]
T}@T{
Yes
T}@T{
Prefixes, delimiters, markers, \f[V]start-after\f[R], continuation
tokens, \f[V]fetch-owner\f[R] and \f[V]encoding-type=url\f[R] all work.
Delimiters other than \f[V]/\f[R] need the whole directory tree walking.
T}
T{
\f[V]HeadObject\f[R], \f[V]GetObject\f[R]
T}@T{
Yes
T}@T{
Including \f[V]Range\f[R], \f[V]partNumber\f[R], the
\f[V]response-*\f[R] header overrides and the \f[V]If-Match\f[R],
\f[V]If-None-Match\f[R], \f[V]If-Modified-Since\f[R] and
\f[V]If-Unmodified-Since\f[R] conditions.
T}
T{
\f[V]PutObject\f[R]
T}@T{
Yes
T}@T{
Including \f[V]Content-MD5\f[R], \f[V]aws-chunked\f[R] uploads and
uploads with no \f[V]Content-Length\f[R].
T}
T{
\f[V]CopyObject\f[R]
T}@T{
Yes
T}@T{
Including the metadata and tagging directives and the
\f[V]x-amz-copy-source-if-*\f[R] conditions.
T}
T{
\f[V]DeleteObject\f[R], \f[V]DeleteObjects\f[R]
T}@T{
Yes
T}@T{
T}
T{
Multipart uploads
T}@T{
Yes
T}@T{
\f[V]CreateMultipartUpload\f[R], \f[V]UploadPart\f[R],
\f[V]UploadPartCopy\f[R], \f[V]CompleteMultipartUpload\f[R],
\f[V]AbortMultipartUpload\f[R], \f[V]ListMultipartUploads\f[R] and
\f[V]ListParts\f[R].
The \f[V]ETag\f[R] of the object is its hash, not the \f[V]-N\f[R]
suffixed one AWS gives.
The 5 MiB minimum part size isn\[aq]t enforced.
T}
T{
Conditional writes
T}@T{
Partial
T}@T{
\f[V]If-Match\f[R] and \f[V]If-None-Match\f[R] on \f[V]PutObject\f[R]
and \f[V]CompleteMultipartUpload\f[R] are checked, but not atomically
against changes made to the remote some other way (see Limitations).
T}
T{
Authentication
T}@T{
Partial
T}@T{
AWS Signature Version 4, in headers, presigned URLs and browser form
(\f[V]POST\f[R]) uploads.
Signature Version 2 isn\[aq]t supported.
T}
T{
Anonymous access
T}@T{
Partial
T}@T{
All requests are allowed without \f[V]--auth-key\f[R] or
\f[V]--auth-proxy\f[R], and none are with them, as buckets and objects
can\[aq]t be made public.
T}
T{
Metadata
T}@T{
Partial
T}@T{
\f[V]x-amz-meta-*\f[R], the storage class and the standard headers such
as \f[V]Content-Type\f[R] are kept in memory only (see Limitations),
except the modification time.
The storage class is only recorded, so doesn\[aq]t change how the object
is stored.
T}
T{
Directory markers
T}@T{
Partial
T}@T{
Keys ending in \f[V]/\f[R] are stored as directories, so can\[aq]t hold
data.
A marker put for a directory holding other keys is only listed while it
is remembered in memory, unless \f[V]--directory-markers\f[R] is set
(see Object names).
T}
T{
Checksums
T}@T{
Partial
T}@T{
The \f[V]x-amz-checksum-*\f[R] of a \f[V]PutObject\f[R] (CRC32, CRC32C,
CRC64NVME, SHA1 or SHA256) is checked and returned with the metadata.
The \f[V]Content-MD5\f[R] and \f[V]x-amz-checksum-*\f[R] of the bodies
of other requests, such as \f[V]DeleteObjects\f[R], are checked.
The checksums of multipart uploads aren\[aq]t supported.
T}
T{
\f[V]GetObjectAttributes\f[R]
T}@T{
Partial
T}@T{
Everything but the checksums of multipart uploads.
T}
T{
Object tagging
T}@T{
Partial
T}@T{
\f[V]GetObjectTagging\f[R], \f[V]PutObjectTagging\f[R] and
\f[V]DeleteObjectTagging\f[R] work, but tags are kept in memory with the
metadata.
T}
T{
Bucket owner
T}@T{
No
T}@T{
\f[V]serve s3\f[R] has no AWS account IDs, so
\f[V]x-amz-expected-bucket-owner\f[R] and
\f[V]x-amz-source-expected-bucket-owner\f[R] are ignored.
T}
T{
ACLs
T}@T{
Partial
T}@T{
\f[V]GetBucketAcl\f[R] and \f[V]GetObjectAcl\f[R] give the owner full
control.
Only the \f[V]private\f[R] ACL can be set.
T}
T{
CORS
T}@T{
Partial
T}@T{
Preflight (\f[V]OPTIONS\f[R]) requests are answered, allowing any
origin.
CORS configuration (\f[V]PutBucketCors\f[R]) isn\[aq]t supported.
T}
T{
Server side encryption
T}@T{
No
T}@T{
SSE-S3 (\f[V]AES256\f[R]) is accepted but the data isn\[aq]t encrypted.
SSE-KMS and SSE-C are refused.
T}
T{
Versioning
T}@T{
No
T}@T{
Buckets are reported as unversioned and \f[V]ListObjectVersions\f[R]
lists each object as version \f[V]null\f[R].
Enabling versioning is refused.
T}
T{
Object lock, retention and legal hold
T}@T{
No
T}@T{
T}
T{
Bucket configuration
T}@T{
No
T}@T{
Bucket policies, tagging, lifecycle, logging, encryption, website,
replication, notifications and the like.
Getting them fails as for a bucket without them configured.
T}
T{
\f[V]SelectObjectContent\f[R], \f[V]RestoreObject\f[R], torrents
T}@T{
No
T}@T{
T}
.TE
.PP
The ceph s3-tests (https://github.com/ceph/s3-tests) can be run against
\f[V]serve s3\f[R] to check its compatibility.
See
cmd/serve/s3/s3tests (https://github.com/rclone/rclone/tree/master/cmd/serve/s3/s3tests)
for how.
.SS Authentication
.PP
By default this will serve files without needing a login.
.PP
You can either use an htpasswd file which can take lots of users, or set
a single username and password with the \f[V]--user\f[R] and
\f[V]--pass\f[R] flags.
.PP
Alternatively, you can have the reverse proxy manage authentication and
use the username provided in the configured header with
\f[V]--user-from-header\f[R] (e.g.,
\f[V]--user-from-header=x-remote-user\f[R]).
Ensure the proxy is trusted and headers cannot be spoofed, as
misconfiguration may lead to unauthorized access.
.PP
If either of the above authentication methods is not configured and
client certificates are required by the \f[V]--client-ca\f[R] flag
passed to the server, the client certificate common name will be
considered as the username.
.PP
Use \f[V]--htpasswd /path/to/htpasswd\f[R] to provide an htpasswd file.
This is in standard apache format and supports MD5, SHA1 and BCrypt for
basic authentication.
Bcrypt is recommended.
.PP
To create an htpasswd file:
.IP
.nf
\f[C]
touch htpasswd
htpasswd -B htpasswd user
htpasswd -B htpasswd anotherUser
\f[R]
.fi
.PP
Use the same hash format and cost for every entry in the file.
If the entries differ, the time taken to reject a wrong password can
reveal which usernames exist.
.PP
The password file can be updated while rclone is running.
.PP
When authentication is enabled every request must be authenticated,
including HTTP OPTIONS requests, as the answer to an OPTIONS request can
reveal whether a path exists.
Health checks or monitoring which use unauthenticated OPTIONS requests
will need to send credentials.
The exception is browser CORS preflight requests when
\f[V]--allow-origin\f[R] is set, which are answered without
authentication as browsers never send credentials with them.
.PP
Use \f[V]--realm\f[R] to set the authentication realm.
.PP
Use \f[V]--salt\f[R] to change the password hashing salt from the
default.
.SS Server options
.PP
Use \f[V]--addr\f[R] to specify which IP address and port the server
should listen on, eg \f[V]--addr 1.2.3.4:8000\f[R] or
\f[V]--addr :8080\f[R] to listen to all IPs.
By default it only listens on localhost.
You can use port :0 to let the OS choose an available port.
.PP
If you set \f[V]--addr\f[R] to listen on a public or LAN accessible IP
address then using Authentication is advised - see the next section for
info.
.PP
You can use a unix socket by setting the url to
\f[V]unix:///path/to/socket\f[R] or just by using an absolute path name.
.PP
\f[V]--addr\f[R] may be repeated to listen on multiple
IPs/ports/sockets.
Socket activation, described further below, can also be used to
accomplish the same.
.PP
\f[V]--server-read-timeout\f[R] and \f[V]--server-write-timeout\f[R] can
be used to control the timeouts on the server.
Note that this is the total time for a transfer.
.PP
\f[V]--max-header-bytes\f[R] controls the maximum number of bytes the
server will accept in the HTTP header.
.PP
\f[V]--response-header\f[R] can be used to set an HTTP header for all
responses, will overriding existing values.
The flag may be repeated to add multiple headers.
Use the format \f[V]Header-Name: value\f[R].
.PP
\f[V]--allow-origin\f[R] enables cross-origin (CORS) requests from
browsers by setting the \f[V]Access-Control-Allow-Origin\f[R] header on
every response to the origin given, e.g.
\f[V]--allow-origin https://app.example.com\f[R].
Browser CORS preflight OPTIONS requests are answered by rclone without
needing authentication as browsers never send credentials with them.
Setting this to \f[V]*\f[R] allows any origin which is a security risk
on an authenticated server.
.PP
\f[V]--baseurl\f[R] controls the URL prefix that rclone serves from.
By default rclone will serve from the root.
If you used \f[V]--baseurl \[dq]/rclone\[dq]\f[R] then rclone would
serve from a URL starting with \[dq]/rclone/\[dq].
This is useful if you wish to proxy rclone serve.
Rclone automatically inserts leading and trailing \[dq]/\[dq] on
\f[V]--baseurl\f[R], so \f[V]--baseurl \[dq]rclone\[dq]\f[R],
\f[V]--baseurl \[dq]/rclone\[dq]\f[R] and
\f[V]--baseurl \[dq]/rclone/\[dq]\f[R] are all treated identically.
.PP
\f[V]--disable-zip\f[R] may be set to disable the zipping download
option.
.SS Protocol
.PP
The server supports HTTP/1.1 and HTTP/2.
HTTP/2 is used automatically for TLS connections.
For non-TLS connections, HTTP/2 cleartext (h2c) is supported, allowing
HTTP/2 without encryption.
.SS TLS (SSL)
.PP
By default this will serve over http.
If you want you can serve over https.
You will need to supply the \f[V]--cert\f[R] and \f[V]--key\f[R] flags.
If you wish to do client side certificate validation then you will need
to supply \f[V]--client-ca\f[R] also.
.PP
When TLS is configured every listener given with \f[V]--addr\f[R] serves
TLS.
An individual listener can be prefixed with \f[V]http://\f[R] to serve
unencrypted HTTP on that address, or with \f[V]tls://\f[R] to state
explicitly that it must serve TLS.
Using a \f[V]tls://\f[R] address without \f[V]--cert\f[R] and
\f[V]--key\f[R] is an error.
.PP
\f[V]--cert\f[R] must be set to the path of a file containing either a
PEM encoded certificate, or a concatenation of that with the CA
certificate.
\f[V]--key\f[R] must be set to the path of a file with the PEM encoded
private key.
If setting \f[V]--client-ca\f[R], it should be set to the path of a file
with PEM encoded client certificate authority certificates.
.PP
\f[V]--min-tls-version\f[R] is minimum TLS version that is acceptable.
Valid values are \[dq]tls1.0\[dq], \[dq]tls1.1\[dq], \[dq]tls1.2\[dq]
and \[dq]tls1.3\[dq] (default \[dq]tls1.0\[dq]).
.SS Socket activation
.PP
Instead of the listening addresses specified above, rclone will listen
to all FDs passed by the service manager, if any (and ignore any
arguments passed by \f[V]--addr\f[R]).
.PP
This allows rclone to be a socket-activated service.
It can be configured with .socket and .service unit files as described
in
<https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html>.
.PP
Socket activation can be tested ad-hoc with the
\f[V]systemd-socket-activate\f[R]command
.IP
.nf
\f[C]
systemd-socket-activate -l 8000 -- rclone serve
\f[R]
.fi
.PP
This will socket-activate rclone on the first connection to port 8000
over TCP.
.SS VFS - Virtual File System
.PP
This command uses the VFS layer.
This adapts the cloud storage objects that rclone uses into something
which looks much more like a disk filing system.
.PP
Cloud storage objects have lots of properties which aren\[aq]t like disk
files - you can\[aq]t extend them or write to the middle of them, so the
VFS layer has to deal with that.
Because there is no one right way of doing this there are various
options explained below.
.PP
The VFS layer also implements a directory cache - this caches info about
files and directories (but not the data) in memory.
.SS VFS Directory Cache
.PP
Using the \f[V]--dir-cache-time\f[R] flag, you can control how long a
directory should be considered up to date and not refreshed from the
backend.
Changes made through the VFS will appear immediately or invalidate the
cache.
.IP
.nf
\f[C]
--dir-cache-time duration Time to cache directory entries for (default 5m0s)
--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)
\f[R]
.fi
.PP
However, changes made directly on the cloud storage by the web interface
or a different copy of rclone will only be picked up once the directory
cache expires if the backend configured does not support polling for
changes.
If the backend supports polling, changes will be picked up within the
polling interval.
.PP
You can send a \f[V]SIGHUP\f[R] signal to rclone for it to flush all
directory caches, regardless of how old they are.
Assuming only one rclone instance is running, you can reset the cache
like this:
.IP
.nf
\f[C]
kill -SIGHUP $(pidof rclone)
\f[R]
.fi
.PP
If you configure rclone with a remote control then you can use rclone rc
to flush the whole directory cache:
.IP
.nf
\f[C]
rclone rc vfs/forget
\f[R]
.fi
.PP
Or individual files or directories:
.IP
.nf
\f[C]
rclone rc vfs/forget file=path/to/file dir=path/to/dir
\f[R]
.fi
.SS VFS File Buffering
.PP
The \f[V]--buffer-size\f[R] flag determines the amount of memory, that
will be used to buffer data in advance.
.PP
Each open file will try to keep the specified amount of data in memory
at all times.
The buffered data is bound to one open file and won\[aq]t be shared.
.PP
This flag is a upper limit for the used memory per open file.
The buffer will only use memory for data that is downloaded but not yet
read.
If the buffer is empty, only a small amount of memory will be used.
.PP
The maximum memory used by rclone for buffering can be up to
\f[V]--buffer-size * open files\f[R].
.SS VFS File Caching
.PP
These flags control the VFS file caching options.
File caching is necessary to make the VFS layer appear compatible with a
normal file system.
It can be disabled at the cost of some compatibility.
.PP
For example you\[aq]ll need to enable VFS caching if you want to read
and write simultaneously to a file.
See below for more details.
.PP
Note that the VFS cache is separate from the cache backend and you may
find that you need one or the other or both.
.IP
.nf
\f[C]
--cache-dir string Directory rclone will use for caching.
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
\f[R]
.fi
.PP
If run with \f[V]-vv\f[R] rclone will print the location of the file
cache.
The files are stored in the user cache file area which is OS dependent
but can be controlled with \f[V]--cache-dir\f[R] or setting the
appropriate environment variable.
.PP
The cache has 4 different modes selected by \f[V]--vfs-cache-mode\f[R].
The higher the cache mode the more compatible rclone becomes at the cost
of using disk space.
.PP
Note that files are written back to the remote only when they are closed
and if they haven\[aq]t been accessed for \f[V]--vfs-write-back\f[R]
seconds.
If rclone is quit or dies with files that haven\[aq]t been uploaded,
these will be uploaded next time rclone is run with the same flags.
.PP
If using \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] note that the cache may exceed
these quotas for two reasons.
Firstly because it is only checked every
\f[V]--vfs-cache-poll-interval\f[R].
Secondly because open files cannot be evicted from the cache.
When \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] is exceeded, rclone will attempt to
evict the least accessed files from the cache first.
rclone will start with files that haven\[aq]t been accessed for the
longest.
This cache flushing strategy is efficient and more relevant files are
likely to remain cached.
.PP
The \f[V]--vfs-cache-max-age\f[R] will evict files from the cache after
the set time since last access has passed; it is based on access time,
not on when the file was first added to the cache.
The default value of 1 hour will start evicting files from cache that
haven\[aq]t been accessed for 1 hour.
When a cached file is accessed the 1 hour timer is reset to 0 and will
wait for 1 more hour before evicting.
Specify the time with standard notation, s, m, h, d, w .
.PP
You \f[B]should not\f[R] run two copies of rclone using the same VFS
cache with the same or overlapping remotes if using
\f[V]--vfs-cache-mode > off\f[R].
This can potentially cause data corruption if you do.
You can work around this by giving each rclone its own cache hierarchy
with \f[V]--cache-dir\f[R].
You don\[aq]t need to worry about this if the remotes in use don\[aq]t
overlap.
.SS --vfs-cache-mode off
.PP
In this mode (the default) the cache will read directly from the remote
and write directly to the remote without caching anything on disk.
.PP
This will mean some operations are not possible
.IP \[bu] 2
Files can\[aq]t be opened for both read AND write
.IP \[bu] 2
Files opened for write can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files open for read with O_TRUNC will be opened write only
.IP \[bu] 2
Files open for write only will behave as if O_TRUNC was supplied
.IP \[bu] 2
Open modes O_APPEND, O_TRUNC are ignored
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode minimal
.PP
This is very similar to \[dq]off\[dq] except that files opened for read
AND write will be buffered to disk.
This means that files opened for write will be a lot more compatible,
but uses the minimal disk space.
.PP
These operations are not possible
.IP \[bu] 2
Files opened for write only can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files opened for write only will ignore O_APPEND, O_TRUNC
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode writes
.PP
In this mode files opened for read only are still read directly from the
remote, write only and read/write files are buffered to disk first.
.PP
This mode should support all normal file system operations.
.PP
If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.
.SS --vfs-cache-mode full
.PP
In this mode all reads and writes are buffered to and from disk.
When data is read from the remote this is buffered to disk as well.
.PP
In this mode the files in the cache will be sparse files and rclone will
keep track of which bits of the files it has downloaded.
.PP
So if an application only reads the starts of each file, then rclone
will only buffer the start of the file.
These files will appear to be their full size in the cache, but they
will be sparse files with only the data that has been downloaded present
in them.
.PP
This mode should support all normal file system operations and is
otherwise identical to \f[V]--vfs-cache-mode\f[R] writes.
.PP
When reading a file rclone will read \f[V]--buffer-size\f[R] plus
\f[V]--vfs-read-ahead\f[R] bytes ahead.
The \f[V]--buffer-size\f[R] is buffered in memory whereas the
\f[V]--vfs-read-ahead\f[R] is buffered on disk.
.PP
When using this mode it is recommended that \f[V]--buffer-size\f[R] is
not set too large and \f[V]--vfs-read-ahead\f[R] is set large if
required.
.PP
\f[B]IMPORTANT\f[R] not all file systems support sparse files.
In particular FAT/exFAT do not.
Rclone will perform very badly if the cache directory is on a filesystem
which doesn\[aq]t support sparse files and it will log an ERROR message
if one is detected.
.SS Fingerprinting
.PP
Various parts of the VFS use fingerprinting to see if a local file copy
has changed relative to a remote file.
Fingerprints are made from:
.IP \[bu] 2
size
.IP \[bu] 2
modification time
.IP \[bu] 2
hash
.PP
where available on an object.
.PP
On some backends some of these attributes are slow to read (they take an
extra API call per object, or extra work per object).
.PP
For example \f[V]hash\f[R] is slow with the \f[V]local\f[R] and
\f[V]sftp\f[R] backends as they have to read the entire file and hash
it, and \f[V]modtime\f[R] is slow with the \f[V]s3\f[R],
\f[V]swift\f[R], \f[V]ftp\f[R] and \f[V]qinqstor\f[R] backends because
they need to do an extra API call to fetch it.
.PP
If you use the \f[V]--vfs-fast-fingerprint\f[R] flag then rclone will
not include the slow operations in the fingerprint.
This makes the fingerprinting less accurate but much faster and will
improve the opening time of cached files.
.PP
If you are running a vfs cache over \f[V]local\f[R], \f[V]s3\f[R] or
\f[V]swift\f[R] backends then using this flag is recommended.
.PP
Note that if you change the value of this flag, the fingerprints of the
files in the cache may be invalidated and the files will need to be
downloaded again.
.SS VFS Chunked Reading
.PP
When rclone reads files from a remote it reads them in chunks.
This means that rather than requesting the whole file rclone reads the
chunk specified.
This can reduce the used download quota for some remotes by requesting
only chunks from the remote that are actually read, at the cost of an
increased number of requests.
.PP
These flags control the chunking:
.IP
.nf
\f[C]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
--vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
\f[R]
.fi
.PP
The chunking behaves differently depending on the
\f[V]--vfs-read-chunk-streams\f[R] parameter.
.SS \f[V]--vfs-read-chunk-streams\f[R] == 0
.PP
Rclone will start reading a chunk of size
\f[V]--vfs-read-chunk-size\f[R], and then double the size for each read.
When \f[V]--vfs-read-chunk-size-limit\f[R] is specified, and greater
than \f[V]--vfs-read-chunk-size\f[R], the chunk size for each open file
will get doubled only until the specified value is reached.
If the value is \[dq]off\[dq], which is the default, the limit is
disabled and the chunk size will grow indefinitely.
.PP
With \f[V]--vfs-read-chunk-size 100M\f[R] and
\f[V]--vfs-read-chunk-size-limit 0\f[R] the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on.
When \f[V]--vfs-read-chunk-size-limit 500M\f[R] is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.
.PP
Setting \f[V]--vfs-read-chunk-size\f[R] to \f[V]0\f[R] or \[dq]off\[dq]
disables chunked reading.
.PP
The chunks will not be buffered in memory.
.SS \f[V]--vfs-read-chunk-streams\f[R] > 0
.PP
Rclone reads \f[V]--vfs-read-chunk-streams\f[R] chunks of size
\f[V]--vfs-read-chunk-size\f[R] concurrently.
The size for each read will stay constant.
.PP
This improves performance massively on high latency links or very high
bandwidth links to high performance object stores.
.PP
Some experimentation will be needed to find the optimum values of
\f[V]--vfs-read-chunk-size\f[R] and \f[V]--vfs-read-chunk-streams\f[R]
as these will depend on the backend in use and the latency to the
backend.
.PP
For high performance object stores (eg AWS S3) a reasonable place to
start might be \f[V]--vfs-read-chunk-streams 16\f[R] and
\f[V]--vfs-read-chunk-size 4M\f[R].
In testing with AWS S3 the performance scaled roughly as the
\f[V]--vfs-read-chunk-streams\f[R] setting.
.PP
Similar settings should work for high latency links, but depending on
the latency they may need more \f[V]--vfs-read-chunk-streams\f[R] in
order to get the throughput.
.SS VFS Performance
.PP
These flags may be used to enable/disable features of the VFS for
performance or other reasons.
See also the chunked reading feature.
.PP
In particular S3 and Swift benefit hugely from the
\f[V]--no-modtime\f[R] flag (or use \f[V]--use-server-modtime\f[R] for a
slightly different effect) as each read of the modification time takes a
transaction.
.IP
.nf
\f[C]
--no-checksum Don\[aq]t compare checksums on up/download.
--no-modtime Don\[aq]t read/write the modification time (can speed things up).
--no-seek Don\[aq]t allow seeking in files.
--read-only Only allow read-only access.
\f[R]
.fi
.PP
Sometimes rclone is delivered reads or writes out of order.
Rather than seeking rclone will wait a short time for the in sequence
read or write to come in.
These flags only come into effect when not using an on disk cache file.
.IP
.nf
\f[C]
--vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
When using VFS write caching (\f[V]--vfs-cache-mode\f[R] with value
writes or full), the global flag \f[V]--transfers\f[R] can be set to
adjust the number of parallel uploads of modified files from the cache
(the related global flag \f[V]--checkers\f[R] has no effect on the VFS).
.IP
.nf
\f[C]
--transfers int Number of file transfers to run in parallel (default 4)
\f[R]
.fi
.SS Symlinks
.PP
By default the VFS does not support symlinks.
However this may be enabled with either of the following flags:
.IP
.nf
\f[C]
--links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension.
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
\f[R]
.fi
.PP
As most cloud storage systems do not support symlinks directly, rclone
stores the symlink as a normal file with a special extension.
So a file which appears as a symlink \f[V]link-to-file.txt\f[R] would be
stored on cloud storage as \f[V]link-to-file.txt.rclonelink\f[R] and the
contents would be the path to the symlink destination.
.PP
Note that \f[V]--links\f[R] enables symlink translation globally in
rclone - this includes any backend which supports the concept (for
example the local backend).
\f[V]--vfs-links\f[R] just enables it for the VFS layer.
.PP
This scheme is compatible with that used by the local backend with the
--local-links flag (https://rclone.org/local/#symlinks-junction-points).
.PP
The \f[V]--vfs-links\f[R] flag has been designed for
\f[V]rclone mount\f[R], \f[V]rclone nfsmount\f[R] and
\f[V]rclone serve nfs\f[R].
.PP
It hasn\[aq]t been tested with the other \f[V]rclone serve\f[R] commands
yet.
.PP
A limitation of the current implementation is that it expects the caller
to resolve sub-symlinks.
For example given this directory tree
.IP
.nf
\f[C]
\&.
├── dir
│\ \ └── file.txt
└── linked-dir -> dir
\f[R]
.fi
.PP
The VFS will correctly resolve \f[V]linked-dir\f[R] but not
\f[V]linked-dir/file.txt\f[R].
This is not a problem for the tested commands but may be for other
commands.
.PP
\f[B]Note\f[R] that there is an outstanding issue with symlink support
issue #8245 (https://github.com/rclone/rclone/issues/8245) with
duplicate files being created when symlinks are moved into directories
where there is a file of the same name (or vice versa).
.SS VFS Case Sensitivity
.PP
Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.
.PP
File systems in modern Windows are case-insensitive but case-preserving:
although existing files can be opened using any case, the exact case
used to create the file is preserved and available for programs to
query.
It is not allowed for two files in the same directory to differ only by
case.
.PP
Usually file systems on macOS are case-insensitive.
It is possible to make macOS file systems case-sensitive but that is not
the default.
.PP
The \f[V]--vfs-case-insensitive\f[R] VFS flag controls how rclone
handles these two cases.
If its value is \[dq]false\[dq], rclone passes file names to the remote
as-is.
If the flag is \[dq]true\[dq] (or appears without a value on the command
line), rclone may perform a \[dq]fixup\[dq] as explained below.
.PP
The user may specify a file name to open/delete/rename/etc with a case
different than what is stored on the remote.
If an argument refers to an existing file with exactly the same name,
then the case of the existing file on the disk will be used.
However, if a file name with exactly the same name is not found but a
name differing only by case exists, rclone will transparently fixup the
name.
This fixup happens only when an existing file is requested.
Case sensitivity of file names created anew by rclone is controlled by
the underlying remote.
.PP
Note that case sensitivity of the operating system running rclone (the
target) may differ from case sensitivity of a file system presented by
rclone (the source).
The flag controls whether \[dq]fixup\[dq] is performed to satisfy the
target.
.PP
If the flag is not provided on the command line, then its default value
depends on the operating system where rclone runs: \[dq]true\[dq] on
Windows and macOS, \[dq]false\[dq] otherwise.
If the flag is provided without a value, then it is \[dq]true\[dq].
.PP
The \f[V]--no-unicode-normalization\f[R] flag controls whether a similar
\[dq]fixup\[dq] is performed for filenames that differ but are
canonically
equivalent (https://en.wikipedia.org/wiki/Unicode_equivalence) with
respect to unicode.
Unicode normalization can be particularly helpful for users of macOS,
which prefers form NFD instead of the NFC used by most other platforms.
It is therefore highly recommended to keep the default of
\f[V]false\f[R] on macOS, to avoid encoding compatibility issues.
.PP
In the (probably unlikely) event that a directory has multiple duplicate
filenames after applying case and unicode normalization, the
\f[V]--vfs-block-norm-dupes\f[R] flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory.
For this reason, it is recommended to leave this disabled if not needed.
However, macOS users may wish to consider using it, as otherwise, if a
remote directory contains both NFC and NFD versions of the same
filename, an odd situation will occur: both versions of the file will be
visible in the mount, and both will appear to be editable, however,
editing either version will actually result in only the NFD version
getting edited under the hood.
\f[V]--vfs-block- norm-dupes\f[R] prevents this confusion by detecting
this scenario, hiding the duplicates, and logging an error, similar to
how this is handled in \f[V]rclone sync\f[R].
.SS VFS Disk Options
.PP
This flag allows you to manually set the statistics about the filing
system.
It can be useful when those statistics cannot be read correctly
automatically.
.IP
.nf
\f[C]
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
\f[R]
.fi
.SS Alternate report of used bytes
.PP
Some backends, most notably S3, do not report the amount of bytes used.
If you need this information to be available when running \f[V]df\f[R]
on the filesystem, then pass the flag \f[V]--vfs-used-is-size\f[R] to
rclone.
With this flag set, instead of relying on the backend to report this
information, rclone will scan the whole remote similar to
\f[V]rclone size\f[R] and compute the total used space itself.
.PP
\f[B]WARNING\f[R]: Contrary to \f[V]rclone size\f[R], this flag ignores
filters so that the result is accurate.
However, this is very inefficient and may cost lots of API calls
resulting in extra charges.
Use it as a last resort and only with caching.
.SS VFS Metadata
.PP
If you use the \f[V]--vfs-metadata-extension\f[R] flag you can get the
VFS to expose files which contain the
metadata (https://rclone.org/docs/#metadata) as a JSON blob.
These files will not appear in the directory listing, but can be
\f[V]stat\f[R]-ed and opened and once they have been they \f[B]will\f[R]
appear in directory listings until the directory cache expires.
.PP
Note that some backends won\[aq]t create metadata unless you pass in the
\f[V]--metadata\f[R] flag.
.PP
For example, using \f[V]rclone mount\f[R] with
\f[V]--metadata --vfs-metadata-extension .metadata\f[R] we get
.IP
.nf
\f[C]
$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
$ cat /mnt/1G.metadata
{
\[dq]atime\[dq]: \[dq]2025-03-04T17:34:22.317069787Z\[dq],
\[dq]btime\[dq]: \[dq]2025-03-03T16:03:37.708253808Z\[dq],
\[dq]gid\[dq]: \[dq]1000\[dq],
\[dq]mode\[dq]: \[dq]100664\[dq],
\[dq]mtime\[dq]: \[dq]2025-03-03T16:03:39.640238323Z\[dq],
\[dq]uid\[dq]: \[dq]1000\[dq]
}
$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
-rw-rw-r-- 1 user user 185 Mar 3 16:03 1G.metadata
\f[R]
.fi
.PP
If the file has no metadata it will be returned as \f[V]{}\f[R] and if
there is an error reading the metadata the error will be returned as
\f[V]{\[dq]error\[dq]:\[dq]error string\[dq]}\f[R].
.SS Auth Proxy
.PP
If you supply the parameter \f[V]--auth-proxy /path/to/program\f[R] then
rclone will use that program to generate backends on the fly which then
are used to authenticate incoming requests.
This uses a simple JSON based protocol with input on STDIN and output on
STDOUT.
.PP
\f[B]PLEASE NOTE:\f[R] \f[V]--auth-proxy\f[R] and
\f[V]--authorized-keys\f[R] cannot be used together, if
\f[V]--auth-proxy\f[R] is set the authorized keys option will be
ignored.
.PP
There is an example program
bin/test_proxy.py (https://github.com/rclone/rclone/blob/master/bin/test_proxy.py)
in the rclone source code.
.PP
The program\[aq]s job is to take a \f[V]user\f[R] and \f[V]pass\f[R] on
the input and turn those into the config for a backend on STDOUT in JSON
format.
This config will have any default parameters for the backend added, but
it won\[aq]t use configuration from environment variables or command
line options - it is the job of the proxy program to make a complete
config.
.PP
This config generated must have this extra parameter
.IP \[bu] 2
\f[V]_root\f[R] - root to use for the backend
.PP
And it may have these parameters
.IP \[bu] 2
\f[V]_obscure\f[R] - comma separated strings for parameters to obscure
.IP \[bu] 2
\f[V]_secret_access_key\f[R] - the secret for S3 access key auth (see
below)
.PP
If password authentication was used by the client, input to the proxy
process (on STDIN) would look similar to this:
.IP
.nf
\f[C]
{
\[dq]user\[dq]: \[dq]me\[dq],
\[dq]pass\[dq]: \[dq]mypassword\[dq],
\[dq]client_ip\[dq]: \[dq]192.168.1.1\[dq]
}
\f[R]
.fi
.PP
If public-key authentication was used by the client, input to the proxy
process (on STDIN) would look similar to this:
.IP
.nf
\f[C]
{
\[dq]user\[dq]: \[dq]me\[dq],
\[dq]public_key\[dq]: \[dq]AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf\[dq],
\[dq]client_ip\[dq]: \[dq]192.168.1.1\[dq]
}
\f[R]
.fi
.PP
If the client authenticated with an S3 access key
(\f[V]rclone serve s3\f[R]), the client never sends its secret, only a
signature made with it, so the input contains just the access key ID as
the \f[V]user\f[R] with no \f[V]pass\f[R] or \f[V]public_key\f[R]:
.IP
.nf
\f[C]
{
\[dq]user\[dq]: \[dq]AKIAIOSFODNN7EXAMPLE\[dq],
\[dq]client_ip\[dq]: \[dq]192.168.1.1\[dq]
}
\f[R]
.fi
.PP
In this case the program must look up the secret access key for that
access key ID and return it in the \f[V]_secret_access_key\f[R] field of
the output.
Rclone then uses that secret to verify the signature on the request,
refusing the request if it does not match.
This means the proxy program is the source of truth for both the
credentials and the backend they map to.
If the program does not return \f[V]_secret_access_key\f[R] or returns
it empty the request is refused.
.PP
The program\[aq]s answer for an access key ID is cached (see below) but
is checked with the program again after 5 minutes even if the access key
ID is in constant use, so revoking an access key ID in the program takes
effect within 5 minutes.
A rotated secret takes effect on the first request signed with it.
.PP
The \f[V]client_ip\f[R] key holds the IP address the client connected
from, without a port number.
It can be used to restrict logins to certain networks, or to log
authentication attempts centrally.
It is omitted if the client has no IP address, for example when
connecting over a unix socket.
Note that if rclone is behind a reverse proxy this will be the address
of the reverse proxy and not the original client.
.PP
And as an example return this on STDOUT
.IP
.nf
\f[C]
{
\[dq]type\[dq]: \[dq]sftp\[dq],
\[dq]_root\[dq]: \[dq]\[dq],
\[dq]_obscure\[dq]: \[dq]pass\[dq],
\[dq]user\[dq]: \[dq]me\[dq],
\[dq]pass\[dq]: \[dq]mypassword\[dq],
\[dq]host\[dq]: \[dq]sftp.example.com\[dq]
}
\f[R]
.fi
.PP
This would mean that an SFTP backend would be created on the fly for the
\f[V]user\f[R] and \f[V]pass\f[R]/\f[V]public_key\f[R] returned in the
output to the host given.
Note that since \f[V]_obscure\f[R] is set to \f[V]pass\f[R], rclone will
obscure the \f[V]pass\f[R] parameter before creating the backend (which
is required for sftp backends).
.PP
The program can manipulate the supplied \f[V]user\f[R] in any way, for
example to make proxy to many different sftp backends, you could make
the \f[V]user\f[R] be \f[V]user\[at]example.com\f[R] and then set the
\f[V]host\f[R] to \f[V]example.com\f[R] in the output and the user to
\f[V]user\f[R].
For security you\[aq]d probably want to restrict the \f[V]host\f[R] to a
limited list.
.PP
An internal cache of backends is keyed on the \f[V]user\f[R], the kind
of credential presented, a hash of the \f[V]pass\f[R] or
\f[V]public_key\f[R], and the \f[V]client_ip\f[R].
This means that if a user\[aq]s password or public-key changes, the
client connects from a new IP address, or the proxy returns different
config parameters (eg a rotated \f[V]api_key\f[R]), a fresh backend will
be created on the next request rather than the cached one being reused.
A backend created for a public key login is never reused for a password
login, so a public key cannot be sent as a password to skip the program.
.PP
A cached answer is checked with the program again after 5 minutes even
if the user is in constant use, so revoking a user in the program takes
effect within 5 minutes.
For \f[V]serve sftp\f[R] this applies to new logins - an existing
connection is not closed.
.PP
This can be used to build general purpose proxies to any kind of backend
that rclone supports.
.IP
.nf
\f[C]
rclone serve s3 remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--addr stringArray IPaddress:Port or :Port to bind server to (default 127.0.0.1:8080)
--allow-origin string Origin which cross-domain request (CORS) can be executed from
--auth-key stringArray Set key pair for v4 authorization: access_key_id,secret_access_key
--auth-proxy string A program to use to create the backend from the auth
--baseurl string Prefix for URLs - leave blank for root
--cert string TLS PEM key (concatenation of certificate and CA certificate)
--client-ca string Client certificate authority to verify clients with
--dir-cache-time Duration Time to cache directory entries for (default 5m0s)
--dir-perms FileMode Directory permissions (default 777)
--directory-markers List every directory as a directory marker object
--disable-multipart-streaming Buffer multipart uploads in memory instead of streaming them to the backend
--etag-hash string Which hash to use for the ETag, or auto or blank for off (default \[dq]MD5\[dq])
--file-perms FileMode File permissions (default 666)
--force-path-style If true use path style access if false use virtual hosted style (default true)
--gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
-h, --help help for s3
--htpasswd string A htpasswd file - if not provided no authentication is done
--key string TLS PEM Private key
--link-perms FileMode Link permissions (default 666)
--max-header-bytes int Maximum size of request header (default 4096)
--metadata-max-objects int Maximum number of objects of a user whose metadata is kept in memory, 0 for unlimited (default 100000)
--min-tls-version string Minimum TLS version that is acceptable (default \[dq]tls1.0\[dq])
--multipart-expiry Duration Abort incomplete multipart uploads idle for longer than this, 0 to keep forever (default 1d)
--multipart-max-uploads int Maximum number of streamed multipart uploads a user can have in progress at once, 0 for unlimited (default 1000)
--multipart-streaming-buffer-limit SizeSuffix Maximum memory buffered per streamed multipart upload for parts arriving out of order, 0 for unlimited (default 256Mi)
--multipart-streaming-buffer-total SizeSuffix Maximum memory buffered by all the streamed multipart uploads of a user for parts arriving out of order, 0 for unlimited (default 1Gi)
--no-checksum Don\[aq]t compare checksums on up/download
--no-cleanup Deprecated: use --directory-markers instead
--no-modtime Don\[aq]t read/write the modification time (can speed things up)
--no-seek Don\[aq]t allow seeking in files
--pass string Password for authentication
--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)
--read-only Only allow read-only access
--realm string Realm for authentication
--response-header stringArray Set HTTP header for all responses, overriding existing values
--salt string Password hashing salt (default \[dq]dlPL2MqE\[dq])
--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 (not supported on Windows) (default 1000)
--umask FileMode Override the permission bits set by the filesystem (not supported on Windows) (default 002)
--user string User name for authentication
--user-from-header string User name from a defined HTTP header
--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)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-case-insensitive If a file name not found, find a case insensitive match
--vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
--vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
--vfs-handle-caching Duration Time to keep file handle and downloaders alive after last close (default 5s)
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
--vfs-metadata-extension string Set the extension to read metadata from
--vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--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 (\[aq]off\[aq] is unlimited) (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone serve (https://rclone.org/commands/rclone_serve/) - Serve a
remote over a protocol.
.SH rclone serve sftp
.PP
Serve the remote over SFTP.
.SS Synopsis
.PP
Run an SFTP server to serve a remote over SFTP.
This can be used with an SFTP client or you can make a remote of type
sftp to use with it.
.PP
You can use the filter flags (e.g.
\f[V]--include\f[R], \f[V]--exclude\f[R]) to control what is served.
.PP
The server will respond to a small number of shell commands, mainly
md5sum, sha1sum and df, which enable it to provide support for checksums
and the about feature when accessed from an sftp remote.
.PP
Note that this server uses standard 32 KiB packet payload size, which
means you must not configure the client to expect anything else, e.g.
with the chunk_size (https://rclone.org/sftp/#sftp-chunk-size) option on
an sftp remote.
.PP
The server will log errors.
Use \f[V]-v\f[R] to see access logs.
.PP
\f[V]--bwlimit\f[R] will be respected for file transfers.
Use \f[V]--stats\f[R] to control the stats printing.
.PP
You must provide some means of authentication, either with
\f[V]--user\f[R]/\f[V]--pass\f[R], an authorized keys file (specify
location with \f[V]--authorized-keys\f[R] - the default is the same as
ssh), an \f[V]--auth-proxy\f[R], or set the \f[V]--no-auth\f[R] flag for
no authentication when logging in.
.PP
If you don\[aq]t supply a host \f[V]--key\f[R] then rclone will generate
rsa, ecdsa and ed25519 variants, and cache them for later use in
rclone\[aq]s cache directory (see \f[V]rclone help flags cache-dir\f[R])
in the \[dq]serve-sftp\[dq] directory.
.PP
By default the server binds to localhost:2022 - if you want it to be
reachable externally then supply \f[V]--addr :2022\f[R] for example.
.PP
This also supports being run with socket activation, in which case it
will listen on the first passed FD.
It can be configured with .socket and .service unit files as described
in
<https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html>.
.PP
Socket activation can be tested ad-hoc with the
\f[V]systemd-socket-activate\f[R]command:
.IP
.nf
\f[C]
systemd-socket-activate -l 2222 -- rclone serve sftp :local:vfs/
\f[R]
.fi
.PP
This will socket-activate rclone on the first connection to port 2222
over TCP.
.PP
Note that the default of \f[V]--vfs-cache-mode off\f[R] is fine for the
rclone sftp backend, but it may not be with other SFTP clients.
.PP
If \f[V]--stdio\f[R] is specified, rclone will serve SFTP over stdio,
which can be used with sshd via \[ti]/.ssh/authorized_keys, for example:
.IP
.nf
\f[C]
restrict,command=\[dq]rclone serve sftp --stdio ./photos\[dq] ssh-rsa ...
\f[R]
.fi
.PP
On the client you need to set \f[V]--transfers 1\f[R] when using
\f[V]--stdio\f[R].
Otherwise multiple instances of the rclone server are started by OpenSSH
which can lead to \[dq]corrupted on transfer\[dq] errors.
This is the case because the client chooses indiscriminately which
server to send commands to while the servers all have different views of
the state of the filing system.
.PP
The \[dq]restrict\[dq] in authorized_keys prevents SHA1SUMs and MD5SUMs
from being used.
Omitting \[dq]restrict\[dq] and using \f[V]--sftp-path-override\f[R] to
enable checksumming is possible but less secure and you could use the
SFTP server provided by OpenSSH in this case.
.SS VFS - Virtual File System
.PP
This command uses the VFS layer.
This adapts the cloud storage objects that rclone uses into something
which looks much more like a disk filing system.
.PP
Cloud storage objects have lots of properties which aren\[aq]t like disk
files - you can\[aq]t extend them or write to the middle of them, so the
VFS layer has to deal with that.
Because there is no one right way of doing this there are various
options explained below.
.PP
The VFS layer also implements a directory cache - this caches info about
files and directories (but not the data) in memory.
.SS VFS Directory Cache
.PP
Using the \f[V]--dir-cache-time\f[R] flag, you can control how long a
directory should be considered up to date and not refreshed from the
backend.
Changes made through the VFS will appear immediately or invalidate the
cache.
.IP
.nf
\f[C]
--dir-cache-time duration Time to cache directory entries for (default 5m0s)
--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)
\f[R]
.fi
.PP
However, changes made directly on the cloud storage by the web interface
or a different copy of rclone will only be picked up once the directory
cache expires if the backend configured does not support polling for
changes.
If the backend supports polling, changes will be picked up within the
polling interval.
.PP
You can send a \f[V]SIGHUP\f[R] signal to rclone for it to flush all
directory caches, regardless of how old they are.
Assuming only one rclone instance is running, you can reset the cache
like this:
.IP
.nf
\f[C]
kill -SIGHUP $(pidof rclone)
\f[R]
.fi
.PP
If you configure rclone with a remote control then you can use rclone rc
to flush the whole directory cache:
.IP
.nf
\f[C]
rclone rc vfs/forget
\f[R]
.fi
.PP
Or individual files or directories:
.IP
.nf
\f[C]
rclone rc vfs/forget file=path/to/file dir=path/to/dir
\f[R]
.fi
.SS VFS File Buffering
.PP
The \f[V]--buffer-size\f[R] flag determines the amount of memory, that
will be used to buffer data in advance.
.PP
Each open file will try to keep the specified amount of data in memory
at all times.
The buffered data is bound to one open file and won\[aq]t be shared.
.PP
This flag is a upper limit for the used memory per open file.
The buffer will only use memory for data that is downloaded but not yet
read.
If the buffer is empty, only a small amount of memory will be used.
.PP
The maximum memory used by rclone for buffering can be up to
\f[V]--buffer-size * open files\f[R].
.SS VFS File Caching
.PP
These flags control the VFS file caching options.
File caching is necessary to make the VFS layer appear compatible with a
normal file system.
It can be disabled at the cost of some compatibility.
.PP
For example you\[aq]ll need to enable VFS caching if you want to read
and write simultaneously to a file.
See below for more details.
.PP
Note that the VFS cache is separate from the cache backend and you may
find that you need one or the other or both.
.IP
.nf
\f[C]
--cache-dir string Directory rclone will use for caching.
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
\f[R]
.fi
.PP
If run with \f[V]-vv\f[R] rclone will print the location of the file
cache.
The files are stored in the user cache file area which is OS dependent
but can be controlled with \f[V]--cache-dir\f[R] or setting the
appropriate environment variable.
.PP
The cache has 4 different modes selected by \f[V]--vfs-cache-mode\f[R].
The higher the cache mode the more compatible rclone becomes at the cost
of using disk space.
.PP
Note that files are written back to the remote only when they are closed
and if they haven\[aq]t been accessed for \f[V]--vfs-write-back\f[R]
seconds.
If rclone is quit or dies with files that haven\[aq]t been uploaded,
these will be uploaded next time rclone is run with the same flags.
.PP
If using \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] note that the cache may exceed
these quotas for two reasons.
Firstly because it is only checked every
\f[V]--vfs-cache-poll-interval\f[R].
Secondly because open files cannot be evicted from the cache.
When \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] is exceeded, rclone will attempt to
evict the least accessed files from the cache first.
rclone will start with files that haven\[aq]t been accessed for the
longest.
This cache flushing strategy is efficient and more relevant files are
likely to remain cached.
.PP
The \f[V]--vfs-cache-max-age\f[R] will evict files from the cache after
the set time since last access has passed; it is based on access time,
not on when the file was first added to the cache.
The default value of 1 hour will start evicting files from cache that
haven\[aq]t been accessed for 1 hour.
When a cached file is accessed the 1 hour timer is reset to 0 and will
wait for 1 more hour before evicting.
Specify the time with standard notation, s, m, h, d, w .
.PP
You \f[B]should not\f[R] run two copies of rclone using the same VFS
cache with the same or overlapping remotes if using
\f[V]--vfs-cache-mode > off\f[R].
This can potentially cause data corruption if you do.
You can work around this by giving each rclone its own cache hierarchy
with \f[V]--cache-dir\f[R].
You don\[aq]t need to worry about this if the remotes in use don\[aq]t
overlap.
.SS --vfs-cache-mode off
.PP
In this mode (the default) the cache will read directly from the remote
and write directly to the remote without caching anything on disk.
.PP
This will mean some operations are not possible
.IP \[bu] 2
Files can\[aq]t be opened for both read AND write
.IP \[bu] 2
Files opened for write can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files open for read with O_TRUNC will be opened write only
.IP \[bu] 2
Files open for write only will behave as if O_TRUNC was supplied
.IP \[bu] 2
Open modes O_APPEND, O_TRUNC are ignored
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode minimal
.PP
This is very similar to \[dq]off\[dq] except that files opened for read
AND write will be buffered to disk.
This means that files opened for write will be a lot more compatible,
but uses the minimal disk space.
.PP
These operations are not possible
.IP \[bu] 2
Files opened for write only can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files opened for write only will ignore O_APPEND, O_TRUNC
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode writes
.PP
In this mode files opened for read only are still read directly from the
remote, write only and read/write files are buffered to disk first.
.PP
This mode should support all normal file system operations.
.PP
If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.
.SS --vfs-cache-mode full
.PP
In this mode all reads and writes are buffered to and from disk.
When data is read from the remote this is buffered to disk as well.
.PP
In this mode the files in the cache will be sparse files and rclone will
keep track of which bits of the files it has downloaded.
.PP
So if an application only reads the starts of each file, then rclone
will only buffer the start of the file.
These files will appear to be their full size in the cache, but they
will be sparse files with only the data that has been downloaded present
in them.
.PP
This mode should support all normal file system operations and is
otherwise identical to \f[V]--vfs-cache-mode\f[R] writes.
.PP
When reading a file rclone will read \f[V]--buffer-size\f[R] plus
\f[V]--vfs-read-ahead\f[R] bytes ahead.
The \f[V]--buffer-size\f[R] is buffered in memory whereas the
\f[V]--vfs-read-ahead\f[R] is buffered on disk.
.PP
When using this mode it is recommended that \f[V]--buffer-size\f[R] is
not set too large and \f[V]--vfs-read-ahead\f[R] is set large if
required.
.PP
\f[B]IMPORTANT\f[R] not all file systems support sparse files.
In particular FAT/exFAT do not.
Rclone will perform very badly if the cache directory is on a filesystem
which doesn\[aq]t support sparse files and it will log an ERROR message
if one is detected.
.SS Fingerprinting
.PP
Various parts of the VFS use fingerprinting to see if a local file copy
has changed relative to a remote file.
Fingerprints are made from:
.IP \[bu] 2
size
.IP \[bu] 2
modification time
.IP \[bu] 2
hash
.PP
where available on an object.
.PP
On some backends some of these attributes are slow to read (they take an
extra API call per object, or extra work per object).
.PP
For example \f[V]hash\f[R] is slow with the \f[V]local\f[R] and
\f[V]sftp\f[R] backends as they have to read the entire file and hash
it, and \f[V]modtime\f[R] is slow with the \f[V]s3\f[R],
\f[V]swift\f[R], \f[V]ftp\f[R] and \f[V]qinqstor\f[R] backends because
they need to do an extra API call to fetch it.
.PP
If you use the \f[V]--vfs-fast-fingerprint\f[R] flag then rclone will
not include the slow operations in the fingerprint.
This makes the fingerprinting less accurate but much faster and will
improve the opening time of cached files.
.PP
If you are running a vfs cache over \f[V]local\f[R], \f[V]s3\f[R] or
\f[V]swift\f[R] backends then using this flag is recommended.
.PP
Note that if you change the value of this flag, the fingerprints of the
files in the cache may be invalidated and the files will need to be
downloaded again.
.SS VFS Chunked Reading
.PP
When rclone reads files from a remote it reads them in chunks.
This means that rather than requesting the whole file rclone reads the
chunk specified.
This can reduce the used download quota for some remotes by requesting
only chunks from the remote that are actually read, at the cost of an
increased number of requests.
.PP
These flags control the chunking:
.IP
.nf
\f[C]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
--vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
\f[R]
.fi
.PP
The chunking behaves differently depending on the
\f[V]--vfs-read-chunk-streams\f[R] parameter.
.SS \f[V]--vfs-read-chunk-streams\f[R] == 0
.PP
Rclone will start reading a chunk of size
\f[V]--vfs-read-chunk-size\f[R], and then double the size for each read.
When \f[V]--vfs-read-chunk-size-limit\f[R] is specified, and greater
than \f[V]--vfs-read-chunk-size\f[R], the chunk size for each open file
will get doubled only until the specified value is reached.
If the value is \[dq]off\[dq], which is the default, the limit is
disabled and the chunk size will grow indefinitely.
.PP
With \f[V]--vfs-read-chunk-size 100M\f[R] and
\f[V]--vfs-read-chunk-size-limit 0\f[R] the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on.
When \f[V]--vfs-read-chunk-size-limit 500M\f[R] is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.
.PP
Setting \f[V]--vfs-read-chunk-size\f[R] to \f[V]0\f[R] or \[dq]off\[dq]
disables chunked reading.
.PP
The chunks will not be buffered in memory.
.SS \f[V]--vfs-read-chunk-streams\f[R] > 0
.PP
Rclone reads \f[V]--vfs-read-chunk-streams\f[R] chunks of size
\f[V]--vfs-read-chunk-size\f[R] concurrently.
The size for each read will stay constant.
.PP
This improves performance massively on high latency links or very high
bandwidth links to high performance object stores.
.PP
Some experimentation will be needed to find the optimum values of
\f[V]--vfs-read-chunk-size\f[R] and \f[V]--vfs-read-chunk-streams\f[R]
as these will depend on the backend in use and the latency to the
backend.
.PP
For high performance object stores (eg AWS S3) a reasonable place to
start might be \f[V]--vfs-read-chunk-streams 16\f[R] and
\f[V]--vfs-read-chunk-size 4M\f[R].
In testing with AWS S3 the performance scaled roughly as the
\f[V]--vfs-read-chunk-streams\f[R] setting.
.PP
Similar settings should work for high latency links, but depending on
the latency they may need more \f[V]--vfs-read-chunk-streams\f[R] in
order to get the throughput.
.SS VFS Performance
.PP
These flags may be used to enable/disable features of the VFS for
performance or other reasons.
See also the chunked reading feature.
.PP
In particular S3 and Swift benefit hugely from the
\f[V]--no-modtime\f[R] flag (or use \f[V]--use-server-modtime\f[R] for a
slightly different effect) as each read of the modification time takes a
transaction.
.IP
.nf
\f[C]
--no-checksum Don\[aq]t compare checksums on up/download.
--no-modtime Don\[aq]t read/write the modification time (can speed things up).
--no-seek Don\[aq]t allow seeking in files.
--read-only Only allow read-only access.
\f[R]
.fi
.PP
Sometimes rclone is delivered reads or writes out of order.
Rather than seeking rclone will wait a short time for the in sequence
read or write to come in.
These flags only come into effect when not using an on disk cache file.
.IP
.nf
\f[C]
--vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
When using VFS write caching (\f[V]--vfs-cache-mode\f[R] with value
writes or full), the global flag \f[V]--transfers\f[R] can be set to
adjust the number of parallel uploads of modified files from the cache
(the related global flag \f[V]--checkers\f[R] has no effect on the VFS).
.IP
.nf
\f[C]
--transfers int Number of file transfers to run in parallel (default 4)
\f[R]
.fi
.SS Symlinks
.PP
By default the VFS does not support symlinks.
However this may be enabled with either of the following flags:
.IP
.nf
\f[C]
--links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension.
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
\f[R]
.fi
.PP
As most cloud storage systems do not support symlinks directly, rclone
stores the symlink as a normal file with a special extension.
So a file which appears as a symlink \f[V]link-to-file.txt\f[R] would be
stored on cloud storage as \f[V]link-to-file.txt.rclonelink\f[R] and the
contents would be the path to the symlink destination.
.PP
Note that \f[V]--links\f[R] enables symlink translation globally in
rclone - this includes any backend which supports the concept (for
example the local backend).
\f[V]--vfs-links\f[R] just enables it for the VFS layer.
.PP
This scheme is compatible with that used by the local backend with the
--local-links flag (https://rclone.org/local/#symlinks-junction-points).
.PP
The \f[V]--vfs-links\f[R] flag has been designed for
\f[V]rclone mount\f[R], \f[V]rclone nfsmount\f[R] and
\f[V]rclone serve nfs\f[R].
.PP
It hasn\[aq]t been tested with the other \f[V]rclone serve\f[R] commands
yet.
.PP
A limitation of the current implementation is that it expects the caller
to resolve sub-symlinks.
For example given this directory tree
.IP
.nf
\f[C]
\&.
├── dir
│\ \ └── file.txt
└── linked-dir -> dir
\f[R]
.fi
.PP
The VFS will correctly resolve \f[V]linked-dir\f[R] but not
\f[V]linked-dir/file.txt\f[R].
This is not a problem for the tested commands but may be for other
commands.
.PP
\f[B]Note\f[R] that there is an outstanding issue with symlink support
issue #8245 (https://github.com/rclone/rclone/issues/8245) with
duplicate files being created when symlinks are moved into directories
where there is a file of the same name (or vice versa).
.SS VFS Case Sensitivity
.PP
Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.
.PP
File systems in modern Windows are case-insensitive but case-preserving:
although existing files can be opened using any case, the exact case
used to create the file is preserved and available for programs to
query.
It is not allowed for two files in the same directory to differ only by
case.
.PP
Usually file systems on macOS are case-insensitive.
It is possible to make macOS file systems case-sensitive but that is not
the default.
.PP
The \f[V]--vfs-case-insensitive\f[R] VFS flag controls how rclone
handles these two cases.
If its value is \[dq]false\[dq], rclone passes file names to the remote
as-is.
If the flag is \[dq]true\[dq] (or appears without a value on the command
line), rclone may perform a \[dq]fixup\[dq] as explained below.
.PP
The user may specify a file name to open/delete/rename/etc with a case
different than what is stored on the remote.
If an argument refers to an existing file with exactly the same name,
then the case of the existing file on the disk will be used.
However, if a file name with exactly the same name is not found but a
name differing only by case exists, rclone will transparently fixup the
name.
This fixup happens only when an existing file is requested.
Case sensitivity of file names created anew by rclone is controlled by
the underlying remote.
.PP
Note that case sensitivity of the operating system running rclone (the
target) may differ from case sensitivity of a file system presented by
rclone (the source).
The flag controls whether \[dq]fixup\[dq] is performed to satisfy the
target.
.PP
If the flag is not provided on the command line, then its default value
depends on the operating system where rclone runs: \[dq]true\[dq] on
Windows and macOS, \[dq]false\[dq] otherwise.
If the flag is provided without a value, then it is \[dq]true\[dq].
.PP
The \f[V]--no-unicode-normalization\f[R] flag controls whether a similar
\[dq]fixup\[dq] is performed for filenames that differ but are
canonically
equivalent (https://en.wikipedia.org/wiki/Unicode_equivalence) with
respect to unicode.
Unicode normalization can be particularly helpful for users of macOS,
which prefers form NFD instead of the NFC used by most other platforms.
It is therefore highly recommended to keep the default of
\f[V]false\f[R] on macOS, to avoid encoding compatibility issues.
.PP
In the (probably unlikely) event that a directory has multiple duplicate
filenames after applying case and unicode normalization, the
\f[V]--vfs-block-norm-dupes\f[R] flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory.
For this reason, it is recommended to leave this disabled if not needed.
However, macOS users may wish to consider using it, as otherwise, if a
remote directory contains both NFC and NFD versions of the same
filename, an odd situation will occur: both versions of the file will be
visible in the mount, and both will appear to be editable, however,
editing either version will actually result in only the NFD version
getting edited under the hood.
\f[V]--vfs-block- norm-dupes\f[R] prevents this confusion by detecting
this scenario, hiding the duplicates, and logging an error, similar to
how this is handled in \f[V]rclone sync\f[R].
.SS VFS Disk Options
.PP
This flag allows you to manually set the statistics about the filing
system.
It can be useful when those statistics cannot be read correctly
automatically.
.IP
.nf
\f[C]
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
\f[R]
.fi
.SS Alternate report of used bytes
.PP
Some backends, most notably S3, do not report the amount of bytes used.
If you need this information to be available when running \f[V]df\f[R]
on the filesystem, then pass the flag \f[V]--vfs-used-is-size\f[R] to
rclone.
With this flag set, instead of relying on the backend to report this
information, rclone will scan the whole remote similar to
\f[V]rclone size\f[R] and compute the total used space itself.
.PP
\f[B]WARNING\f[R]: Contrary to \f[V]rclone size\f[R], this flag ignores
filters so that the result is accurate.
However, this is very inefficient and may cost lots of API calls
resulting in extra charges.
Use it as a last resort and only with caching.
.SS VFS Metadata
.PP
If you use the \f[V]--vfs-metadata-extension\f[R] flag you can get the
VFS to expose files which contain the
metadata (https://rclone.org/docs/#metadata) as a JSON blob.
These files will not appear in the directory listing, but can be
\f[V]stat\f[R]-ed and opened and once they have been they \f[B]will\f[R]
appear in directory listings until the directory cache expires.
.PP
Note that some backends won\[aq]t create metadata unless you pass in the
\f[V]--metadata\f[R] flag.
.PP
For example, using \f[V]rclone mount\f[R] with
\f[V]--metadata --vfs-metadata-extension .metadata\f[R] we get
.IP
.nf
\f[C]
$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
$ cat /mnt/1G.metadata
{
\[dq]atime\[dq]: \[dq]2025-03-04T17:34:22.317069787Z\[dq],
\[dq]btime\[dq]: \[dq]2025-03-03T16:03:37.708253808Z\[dq],
\[dq]gid\[dq]: \[dq]1000\[dq],
\[dq]mode\[dq]: \[dq]100664\[dq],
\[dq]mtime\[dq]: \[dq]2025-03-03T16:03:39.640238323Z\[dq],
\[dq]uid\[dq]: \[dq]1000\[dq]
}
$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
-rw-rw-r-- 1 user user 185 Mar 3 16:03 1G.metadata
\f[R]
.fi
.PP
If the file has no metadata it will be returned as \f[V]{}\f[R] and if
there is an error reading the metadata the error will be returned as
\f[V]{\[dq]error\[dq]:\[dq]error string\[dq]}\f[R].
.SS Auth Proxy
.PP
If you supply the parameter \f[V]--auth-proxy /path/to/program\f[R] then
rclone will use that program to generate backends on the fly which then
are used to authenticate incoming requests.
This uses a simple JSON based protocol with input on STDIN and output on
STDOUT.
.PP
\f[B]PLEASE NOTE:\f[R] \f[V]--auth-proxy\f[R] and
\f[V]--authorized-keys\f[R] cannot be used together, if
\f[V]--auth-proxy\f[R] is set the authorized keys option will be
ignored.
.PP
There is an example program
bin/test_proxy.py (https://github.com/rclone/rclone/blob/master/bin/test_proxy.py)
in the rclone source code.
.PP
The program\[aq]s job is to take a \f[V]user\f[R] and \f[V]pass\f[R] on
the input and turn those into the config for a backend on STDOUT in JSON
format.
This config will have any default parameters for the backend added, but
it won\[aq]t use configuration from environment variables or command
line options - it is the job of the proxy program to make a complete
config.
.PP
This config generated must have this extra parameter
.IP \[bu] 2
\f[V]_root\f[R] - root to use for the backend
.PP
And it may have these parameters
.IP \[bu] 2
\f[V]_obscure\f[R] - comma separated strings for parameters to obscure
.IP \[bu] 2
\f[V]_secret_access_key\f[R] - the secret for S3 access key auth (see
below)
.PP
If password authentication was used by the client, input to the proxy
process (on STDIN) would look similar to this:
.IP
.nf
\f[C]
{
\[dq]user\[dq]: \[dq]me\[dq],
\[dq]pass\[dq]: \[dq]mypassword\[dq],
\[dq]client_ip\[dq]: \[dq]192.168.1.1\[dq]
}
\f[R]
.fi
.PP
If public-key authentication was used by the client, input to the proxy
process (on STDIN) would look similar to this:
.IP
.nf
\f[C]
{
\[dq]user\[dq]: \[dq]me\[dq],
\[dq]public_key\[dq]: \[dq]AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf\[dq],
\[dq]client_ip\[dq]: \[dq]192.168.1.1\[dq]
}
\f[R]
.fi
.PP
If the client authenticated with an S3 access key
(\f[V]rclone serve s3\f[R]), the client never sends its secret, only a
signature made with it, so the input contains just the access key ID as
the \f[V]user\f[R] with no \f[V]pass\f[R] or \f[V]public_key\f[R]:
.IP
.nf
\f[C]
{
\[dq]user\[dq]: \[dq]AKIAIOSFODNN7EXAMPLE\[dq],
\[dq]client_ip\[dq]: \[dq]192.168.1.1\[dq]
}
\f[R]
.fi
.PP
In this case the program must look up the secret access key for that
access key ID and return it in the \f[V]_secret_access_key\f[R] field of
the output.
Rclone then uses that secret to verify the signature on the request,
refusing the request if it does not match.
This means the proxy program is the source of truth for both the
credentials and the backend they map to.
If the program does not return \f[V]_secret_access_key\f[R] or returns
it empty the request is refused.
.PP
The program\[aq]s answer for an access key ID is cached (see below) but
is checked with the program again after 5 minutes even if the access key
ID is in constant use, so revoking an access key ID in the program takes
effect within 5 minutes.
A rotated secret takes effect on the first request signed with it.
.PP
The \f[V]client_ip\f[R] key holds the IP address the client connected
from, without a port number.
It can be used to restrict logins to certain networks, or to log
authentication attempts centrally.
It is omitted if the client has no IP address, for example when
connecting over a unix socket.
Note that if rclone is behind a reverse proxy this will be the address
of the reverse proxy and not the original client.
.PP
And as an example return this on STDOUT
.IP
.nf
\f[C]
{
\[dq]type\[dq]: \[dq]sftp\[dq],
\[dq]_root\[dq]: \[dq]\[dq],
\[dq]_obscure\[dq]: \[dq]pass\[dq],
\[dq]user\[dq]: \[dq]me\[dq],
\[dq]pass\[dq]: \[dq]mypassword\[dq],
\[dq]host\[dq]: \[dq]sftp.example.com\[dq]
}
\f[R]
.fi
.PP
This would mean that an SFTP backend would be created on the fly for the
\f[V]user\f[R] and \f[V]pass\f[R]/\f[V]public_key\f[R] returned in the
output to the host given.
Note that since \f[V]_obscure\f[R] is set to \f[V]pass\f[R], rclone will
obscure the \f[V]pass\f[R] parameter before creating the backend (which
is required for sftp backends).
.PP
The program can manipulate the supplied \f[V]user\f[R] in any way, for
example to make proxy to many different sftp backends, you could make
the \f[V]user\f[R] be \f[V]user\[at]example.com\f[R] and then set the
\f[V]host\f[R] to \f[V]example.com\f[R] in the output and the user to
\f[V]user\f[R].
For security you\[aq]d probably want to restrict the \f[V]host\f[R] to a
limited list.
.PP
An internal cache of backends is keyed on the \f[V]user\f[R], the kind
of credential presented, a hash of the \f[V]pass\f[R] or
\f[V]public_key\f[R], and the \f[V]client_ip\f[R].
This means that if a user\[aq]s password or public-key changes, the
client connects from a new IP address, or the proxy returns different
config parameters (eg a rotated \f[V]api_key\f[R]), a fresh backend will
be created on the next request rather than the cached one being reused.
A backend created for a public key login is never reused for a password
login, so a public key cannot be sent as a password to skip the program.
.PP
A cached answer is checked with the program again after 5 minutes even
if the user is in constant use, so revoking a user in the program takes
effect within 5 minutes.
For \f[V]serve sftp\f[R] this applies to new logins - an existing
connection is not closed.
.PP
This can be used to build general purpose proxies to any kind of backend
that rclone supports.
.IP
.nf
\f[C]
rclone serve sftp remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--addr string IPaddress:Port or :Port to bind server to (default \[dq]localhost:2022\[dq])
--auth-proxy string A program to use to create the backend from the auth
--authorized-keys string Authorized keys file (default \[dq]\[ti]/.ssh/authorized_keys\[dq])
--dir-cache-time Duration Time to cache directory entries for (default 5m0s)
--dir-perms FileMode Directory permissions (default 777)
--file-perms FileMode File permissions (default 666)
--gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
-h, --help help for sftp
--key stringArray SSH private host key file (Can be multi-valued, leave blank to auto generate)
--link-perms FileMode Link permissions (default 666)
--no-auth Allow connections with no authentication if set
--no-checksum Don\[aq]t compare checksums on up/download
--no-modtime Don\[aq]t read/write the modification time (can speed things up)
--no-seek Don\[aq]t allow seeking in files
--pass string Password for authentication
--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)
--read-only Only allow read-only access
--stdio Run an sftp server on stdin/stdout
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask FileMode Override the permission bits set by the filesystem (not supported on Windows) (default 002)
--user string User name for authentication
--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)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-case-insensitive If a file name not found, find a case insensitive match
--vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
--vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
--vfs-handle-caching Duration Time to keep file handle and downloaders alive after last close (default 5s)
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
--vfs-metadata-extension string Set the extension to read metadata from
--vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--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 (\[aq]off\[aq] is unlimited) (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone serve (https://rclone.org/commands/rclone_serve/) - Serve a
remote over a protocol.
.SH rclone serve webdav
.PP
Serve remote:path over WebDAV.
.SS Synopsis
.PP
Run a basic WebDAV server to serve a remote over HTTP via the WebDAV
protocol.
This can be viewed with a WebDAV client, through a web browser, or you
can make a remote of type WebDAV to read and write it.
.SS WebDAV options
.SS --etag-hash
.PP
This controls the ETag header.
Without this flag the ETag will be based on the ModTime and Size of the
object.
.PP
If this flag is set to \[dq]auto\[dq] then rclone will choose the first
supported hash on the backend or you can use a named hash such as
\[dq]MD5\[dq] or \[dq]SHA-1\[dq].
Use the hashsum (https://rclone.org/commands/rclone_hashsum/) command to
see the full list.
.SS Gzip compression
.PP
The server will compress certain response bodies (text and XML,
including WebDAV PROPFIND responses) using gzip when the client
advertises gzip support via the \f[V]Accept-Encoding: gzip\f[R] request
header.
This reduces bandwidth usage.
.SS Access WebDAV on Windows
.PP
WebDAV shared folder can be mapped as a drive on Windows, however the
default settings prevent it.
Windows will fail to connect to the server using insecure Basic
authentication.
It will not even display any login dialog.
Windows requires SSL / HTTPS connection to be used with Basic.
If you try to connect via Add Network Location Wizard you will get the
following error: \[dq]The folder you entered does not appear to be
valid.
Please choose another\[dq].
However, you still can connect if you set the following registry key on
a client machine:
\f[V]HKEY_LOCAL_MACHINE\[rs]SYSTEM\[rs]CurrentControlSet\[rs]Services\[rs]WebClient\[rs]Parameters\[rs]BasicAuthLevel\f[R]
to 2.
The BasicAuthLevel can be set to the following values:
.IP
.nf
\f[C]
0 - Basic authentication disabled
1 - Basic authentication enabled for SSL connections only
2 - Basic authentication enabled for SSL connections and for non-SSL connections
\f[R]
.fi
.PP
If required, increase the FileSizeLimitInBytes to a higher value.
Navigate to the Services interface, then restart the WebClient service.
.SS Access Office applications on WebDAV
.PP
Navigate to following registry
\f[V]HKEY_CURRENT_USER\[rs]Software\[rs]Microsoft\[rs]Office\[rs][14.0/15.0/16.0]\[rs]Common\[rs]Internet\f[R]
Create a new DWORD BasicAuthLevel with value 2.
.IP
.nf
\f[C]
0 - Basic authentication disabled
1 - Basic authentication enabled for SSL connections only
2 - Basic authentication enabled for SSL and for non-SSL connections
\f[R]
.fi
.PP
<https://learn.microsoft.com/en-us/office/troubleshoot/powerpoint/office-opens-blank-from-sharepoint>
.SS Serving over a unix socket
.PP
You can serve the webdav on a unix socket like this:
.IP
.nf
\f[C]
rclone serve webdav --addr unix:///tmp/my.socket remote:path
\f[R]
.fi
.PP
and connect to it like this using rclone and the webdav backend:
.IP
.nf
\f[C]
rclone --webdav-unix-socket /tmp/my.socket --webdav-url http://localhost lsf :webdav:
\f[R]
.fi
.PP
Note that there is no authentication on http protocol - this is expected
to be done by the permissions on the socket.
.SS Symlinks / Junction points
.PP
The webdav protocol does not support symlinks or junction points and by
default rclone will skip them completely.
.PP
You can use \f[V]-L\f[R] to get rclone to follow symlinks or you can use
\f[V]--local-links\f[R] to make rclone show \f[V].rclonelink\f[R] files
in place of the symlinks.
.PP
\f[B]NB\f[R] Do not use \f[V]--links\f[R] as since v1.69 this applies to
the VFS layer too, use \f[V]--local-links\f[R] which only applies to the
local backend only.
.SS Server options
.PP
Use \f[V]--addr\f[R] to specify which IP address and port the server
should listen on, eg \f[V]--addr 1.2.3.4:8000\f[R] or
\f[V]--addr :8080\f[R] to listen to all IPs.
By default it only listens on localhost.
You can use port :0 to let the OS choose an available port.
.PP
If you set \f[V]--addr\f[R] to listen on a public or LAN accessible IP
address then using Authentication is advised - see the next section for
info.
.PP
You can use a unix socket by setting the url to
\f[V]unix:///path/to/socket\f[R] or just by using an absolute path name.
.PP
\f[V]--addr\f[R] may be repeated to listen on multiple
IPs/ports/sockets.
Socket activation, described further below, can also be used to
accomplish the same.
.PP
\f[V]--server-read-timeout\f[R] and \f[V]--server-write-timeout\f[R] can
be used to control the timeouts on the server.
Note that this is the total time for a transfer.
.PP
\f[V]--max-header-bytes\f[R] controls the maximum number of bytes the
server will accept in the HTTP header.
.PP
\f[V]--response-header\f[R] can be used to set an HTTP header for all
responses, will overriding existing values.
The flag may be repeated to add multiple headers.
Use the format \f[V]Header-Name: value\f[R].
.PP
\f[V]--allow-origin\f[R] enables cross-origin (CORS) requests from
browsers by setting the \f[V]Access-Control-Allow-Origin\f[R] header on
every response to the origin given, e.g.
\f[V]--allow-origin https://app.example.com\f[R].
Browser CORS preflight OPTIONS requests are answered by rclone without
needing authentication as browsers never send credentials with them.
Setting this to \f[V]*\f[R] allows any origin which is a security risk
on an authenticated server.
.PP
\f[V]--baseurl\f[R] controls the URL prefix that rclone serves from.
By default rclone will serve from the root.
If you used \f[V]--baseurl \[dq]/rclone\[dq]\f[R] then rclone would
serve from a URL starting with \[dq]/rclone/\[dq].
This is useful if you wish to proxy rclone serve.
Rclone automatically inserts leading and trailing \[dq]/\[dq] on
\f[V]--baseurl\f[R], so \f[V]--baseurl \[dq]rclone\[dq]\f[R],
\f[V]--baseurl \[dq]/rclone\[dq]\f[R] and
\f[V]--baseurl \[dq]/rclone/\[dq]\f[R] are all treated identically.
.PP
\f[V]--disable-zip\f[R] may be set to disable the zipping download
option.
.SS Protocol
.PP
The server supports HTTP/1.1 and HTTP/2.
HTTP/2 is used automatically for TLS connections.
For non-TLS connections, HTTP/2 cleartext (h2c) is supported, allowing
HTTP/2 without encryption.
.SS TLS (SSL)
.PP
By default this will serve over http.
If you want you can serve over https.
You will need to supply the \f[V]--cert\f[R] and \f[V]--key\f[R] flags.
If you wish to do client side certificate validation then you will need
to supply \f[V]--client-ca\f[R] also.
.PP
When TLS is configured every listener given with \f[V]--addr\f[R] serves
TLS.
An individual listener can be prefixed with \f[V]http://\f[R] to serve
unencrypted HTTP on that address, or with \f[V]tls://\f[R] to state
explicitly that it must serve TLS.
Using a \f[V]tls://\f[R] address without \f[V]--cert\f[R] and
\f[V]--key\f[R] is an error.
.PP
\f[V]--cert\f[R] must be set to the path of a file containing either a
PEM encoded certificate, or a concatenation of that with the CA
certificate.
\f[V]--key\f[R] must be set to the path of a file with the PEM encoded
private key.
If setting \f[V]--client-ca\f[R], it should be set to the path of a file
with PEM encoded client certificate authority certificates.
.PP
\f[V]--min-tls-version\f[R] is minimum TLS version that is acceptable.
Valid values are \[dq]tls1.0\[dq], \[dq]tls1.1\[dq], \[dq]tls1.2\[dq]
and \[dq]tls1.3\[dq] (default \[dq]tls1.0\[dq]).
.SS Socket activation
.PP
Instead of the listening addresses specified above, rclone will listen
to all FDs passed by the service manager, if any (and ignore any
arguments passed by \f[V]--addr\f[R]).
.PP
This allows rclone to be a socket-activated service.
It can be configured with .socket and .service unit files as described
in
<https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html>.
.PP
Socket activation can be tested ad-hoc with the
\f[V]systemd-socket-activate\f[R]command
.IP
.nf
\f[C]
systemd-socket-activate -l 8000 -- rclone serve
\f[R]
.fi
.PP
This will socket-activate rclone on the first connection to port 8000
over TCP.
.SS Template
.PP
\f[V]--template\f[R] allows a user to specify a custom markup template
for HTTP and WebDAV serve functions.
The server exports the following markup to be used within the template
to server pages:
.PP
.TS
tab(@);
lw(22.6n) lw(24.7n) lw(22.6n).
T{
Parameter
T}@T{
Subparameter
T}@T{
Description
T}
_
T{
\&.Name
T}@T{
T}@T{
The full path of a file/directory.
T}
T{
\&.Title
T}@T{
T}@T{
Directory listing of \[aq].Name\[aq].
T}
T{
\&.Sort
T}@T{
T}@T{
The current sort used.
This is changeable via \[aq]?sort=\[aq] parameter.
Possible values: namedirfirst, name, size, time (default namedirfirst).
T}
T{
\&.Order
T}@T{
T}@T{
The current ordering used.
This is changeable via \[aq]?order=\[aq] parameter.
Possible values: asc, desc (default asc).
T}
T{
\&.Query
T}@T{
T}@T{
Currently unused.
T}
T{
\&.Path
T}@T{
T}@T{
The path of the directory from the root with leading and trailing
slashes, e.g.
\[aq]/dir/\[aq].
T}
T{
\&.IsRoot
T}@T{
T}@T{
Boolean for if this is the root directory.
T}
T{
\&.UpLink
T}@T{
T}@T{
The link to the parent directory.
T}
T{
\&.Static
T}@T{
T}@T{
Boolean for if the listing is being written as a static page by rclone
index.
T}
T{
\&.NumDirs
T}@T{
T}@T{
The number of directories in the listing.
T}
T{
\&.NumFiles
T}@T{
T}@T{
The number of files in the listing.
T}
T{
\&.TotalSize
T}@T{
T}@T{
The total size in bytes of the files in the listing.
T}
T{
\&.Breadcrumb
T}@T{
T}@T{
Allows for creating a relative navigation.
T}
T{
T}@T{
\&.Link
T}@T{
The link of the Text relative to the root.
T}
T{
T}@T{
\&.Text
T}@T{
The Name of the directory.
T}
T{
\&.Entries
T}@T{
T}@T{
Information about a specific file/directory.
T}
T{
T}@T{
\&.URL
T}@T{
The url of an entry.
T}
T{
T}@T{
\&.Leaf
T}@T{
Currently same as \[aq].URL\[aq] but intended to be just the name.
T}
T{
T}@T{
\&.IsDir
T}@T{
Boolean for if an entry is a directory or not.
T}
T{
T}@T{
\&.Size
T}@T{
Size in bytes of the entry.
T}
T{
T}@T{
\&.ModTime
T}@T{
The UTC timestamp of an entry.
T}
T{
T}@T{
\&.MimeType
T}@T{
The MIME type of an entry guessed from its name, or
\[aq]inode/directory\[aq].
T}
.TE
.PP
The server also makes the following functions available so that they can
be used within the template.
These functions help extend the options for dynamic rendering of HTML.
They can be used to render HTML based on specific conditions.
.PP
.TS
tab(@);
lw(35.0n) lw(35.0n).
T{
Function
T}@T{
Description
T}
_
T{
afterEpoch
T}@T{
Returns the time since the epoch for the given time.
T}
T{
contains
T}@T{
Checks whether a given substring is present or not in a given string.
T}
T{
hasPrefix
T}@T{
Checks whether the given string begins with the specified prefix.
T}
T{
hasSuffix
T}@T{
Checks whether the given string end with the specified suffix.
T}
.TE
.SS Authentication
.PP
By default this will serve files without needing a login.
.PP
You can either use an htpasswd file which can take lots of users, or set
a single username and password with the \f[V]--user\f[R] and
\f[V]--pass\f[R] flags.
.PP
Alternatively, you can have the reverse proxy manage authentication and
use the username provided in the configured header with
\f[V]--user-from-header\f[R] (e.g.,
\f[V]--user-from-header=x-remote-user\f[R]).
Ensure the proxy is trusted and headers cannot be spoofed, as
misconfiguration may lead to unauthorized access.
.PP
If either of the above authentication methods is not configured and
client certificates are required by the \f[V]--client-ca\f[R] flag
passed to the server, the client certificate common name will be
considered as the username.
.PP
Use \f[V]--htpasswd /path/to/htpasswd\f[R] to provide an htpasswd file.
This is in standard apache format and supports MD5, SHA1 and BCrypt for
basic authentication.
Bcrypt is recommended.
.PP
To create an htpasswd file:
.IP
.nf
\f[C]
touch htpasswd
htpasswd -B htpasswd user
htpasswd -B htpasswd anotherUser
\f[R]
.fi
.PP
Use the same hash format and cost for every entry in the file.
If the entries differ, the time taken to reject a wrong password can
reveal which usernames exist.
.PP
The password file can be updated while rclone is running.
.PP
When authentication is enabled every request must be authenticated,
including HTTP OPTIONS requests, as the answer to an OPTIONS request can
reveal whether a path exists.
Health checks or monitoring which use unauthenticated OPTIONS requests
will need to send credentials.
The exception is browser CORS preflight requests when
\f[V]--allow-origin\f[R] is set, which are answered without
authentication as browsers never send credentials with them.
.PP
Use \f[V]--realm\f[R] to set the authentication realm.
.PP
Use \f[V]--salt\f[R] to change the password hashing salt from the
default.
.SS VFS - Virtual File System
.PP
This command uses the VFS layer.
This adapts the cloud storage objects that rclone uses into something
which looks much more like a disk filing system.
.PP
Cloud storage objects have lots of properties which aren\[aq]t like disk
files - you can\[aq]t extend them or write to the middle of them, so the
VFS layer has to deal with that.
Because there is no one right way of doing this there are various
options explained below.
.PP
The VFS layer also implements a directory cache - this caches info about
files and directories (but not the data) in memory.
.SS VFS Directory Cache
.PP
Using the \f[V]--dir-cache-time\f[R] flag, you can control how long a
directory should be considered up to date and not refreshed from the
backend.
Changes made through the VFS will appear immediately or invalidate the
cache.
.IP
.nf
\f[C]
--dir-cache-time duration Time to cache directory entries for (default 5m0s)
--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)
\f[R]
.fi
.PP
However, changes made directly on the cloud storage by the web interface
or a different copy of rclone will only be picked up once the directory
cache expires if the backend configured does not support polling for
changes.
If the backend supports polling, changes will be picked up within the
polling interval.
.PP
You can send a \f[V]SIGHUP\f[R] signal to rclone for it to flush all
directory caches, regardless of how old they are.
Assuming only one rclone instance is running, you can reset the cache
like this:
.IP
.nf
\f[C]
kill -SIGHUP $(pidof rclone)
\f[R]
.fi
.PP
If you configure rclone with a remote control then you can use rclone rc
to flush the whole directory cache:
.IP
.nf
\f[C]
rclone rc vfs/forget
\f[R]
.fi
.PP
Or individual files or directories:
.IP
.nf
\f[C]
rclone rc vfs/forget file=path/to/file dir=path/to/dir
\f[R]
.fi
.SS VFS File Buffering
.PP
The \f[V]--buffer-size\f[R] flag determines the amount of memory, that
will be used to buffer data in advance.
.PP
Each open file will try to keep the specified amount of data in memory
at all times.
The buffered data is bound to one open file and won\[aq]t be shared.
.PP
This flag is a upper limit for the used memory per open file.
The buffer will only use memory for data that is downloaded but not yet
read.
If the buffer is empty, only a small amount of memory will be used.
.PP
The maximum memory used by rclone for buffering can be up to
\f[V]--buffer-size * open files\f[R].
.SS VFS File Caching
.PP
These flags control the VFS file caching options.
File caching is necessary to make the VFS layer appear compatible with a
normal file system.
It can be disabled at the cost of some compatibility.
.PP
For example you\[aq]ll need to enable VFS caching if you want to read
and write simultaneously to a file.
See below for more details.
.PP
Note that the VFS cache is separate from the cache backend and you may
find that you need one or the other or both.
.IP
.nf
\f[C]
--cache-dir string Directory rclone will use for caching.
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-max-age duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-write-back duration Time to writeback files after last use when using cache (default 5s)
\f[R]
.fi
.PP
If run with \f[V]-vv\f[R] rclone will print the location of the file
cache.
The files are stored in the user cache file area which is OS dependent
but can be controlled with \f[V]--cache-dir\f[R] or setting the
appropriate environment variable.
.PP
The cache has 4 different modes selected by \f[V]--vfs-cache-mode\f[R].
The higher the cache mode the more compatible rclone becomes at the cost
of using disk space.
.PP
Note that files are written back to the remote only when they are closed
and if they haven\[aq]t been accessed for \f[V]--vfs-write-back\f[R]
seconds.
If rclone is quit or dies with files that haven\[aq]t been uploaded,
these will be uploaded next time rclone is run with the same flags.
.PP
If using \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] note that the cache may exceed
these quotas for two reasons.
Firstly because it is only checked every
\f[V]--vfs-cache-poll-interval\f[R].
Secondly because open files cannot be evicted from the cache.
When \f[V]--vfs-cache-max-size\f[R] or
\f[V]--vfs-cache-min-free-space\f[R] is exceeded, rclone will attempt to
evict the least accessed files from the cache first.
rclone will start with files that haven\[aq]t been accessed for the
longest.
This cache flushing strategy is efficient and more relevant files are
likely to remain cached.
.PP
The \f[V]--vfs-cache-max-age\f[R] will evict files from the cache after
the set time since last access has passed; it is based on access time,
not on when the file was first added to the cache.
The default value of 1 hour will start evicting files from cache that
haven\[aq]t been accessed for 1 hour.
When a cached file is accessed the 1 hour timer is reset to 0 and will
wait for 1 more hour before evicting.
Specify the time with standard notation, s, m, h, d, w .
.PP
You \f[B]should not\f[R] run two copies of rclone using the same VFS
cache with the same or overlapping remotes if using
\f[V]--vfs-cache-mode > off\f[R].
This can potentially cause data corruption if you do.
You can work around this by giving each rclone its own cache hierarchy
with \f[V]--cache-dir\f[R].
You don\[aq]t need to worry about this if the remotes in use don\[aq]t
overlap.
.SS --vfs-cache-mode off
.PP
In this mode (the default) the cache will read directly from the remote
and write directly to the remote without caching anything on disk.
.PP
This will mean some operations are not possible
.IP \[bu] 2
Files can\[aq]t be opened for both read AND write
.IP \[bu] 2
Files opened for write can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files open for read with O_TRUNC will be opened write only
.IP \[bu] 2
Files open for write only will behave as if O_TRUNC was supplied
.IP \[bu] 2
Open modes O_APPEND, O_TRUNC are ignored
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode minimal
.PP
This is very similar to \[dq]off\[dq] except that files opened for read
AND write will be buffered to disk.
This means that files opened for write will be a lot more compatible,
but uses the minimal disk space.
.PP
These operations are not possible
.IP \[bu] 2
Files opened for write only can\[aq]t be seeked
.IP \[bu] 2
Existing files opened for write must have O_TRUNC set
.IP \[bu] 2
Files opened for write only will ignore O_APPEND, O_TRUNC
.IP \[bu] 2
If an upload fails it can\[aq]t be retried
.SS --vfs-cache-mode writes
.PP
In this mode files opened for read only are still read directly from the
remote, write only and read/write files are buffered to disk first.
.PP
This mode should support all normal file system operations.
.PP
If an upload fails it will be retried at exponentially increasing
intervals up to 1 minute.
.SS --vfs-cache-mode full
.PP
In this mode all reads and writes are buffered to and from disk.
When data is read from the remote this is buffered to disk as well.
.PP
In this mode the files in the cache will be sparse files and rclone will
keep track of which bits of the files it has downloaded.
.PP
So if an application only reads the starts of each file, then rclone
will only buffer the start of the file.
These files will appear to be their full size in the cache, but they
will be sparse files with only the data that has been downloaded present
in them.
.PP
This mode should support all normal file system operations and is
otherwise identical to \f[V]--vfs-cache-mode\f[R] writes.
.PP
When reading a file rclone will read \f[V]--buffer-size\f[R] plus
\f[V]--vfs-read-ahead\f[R] bytes ahead.
The \f[V]--buffer-size\f[R] is buffered in memory whereas the
\f[V]--vfs-read-ahead\f[R] is buffered on disk.
.PP
When using this mode it is recommended that \f[V]--buffer-size\f[R] is
not set too large and \f[V]--vfs-read-ahead\f[R] is set large if
required.
.PP
\f[B]IMPORTANT\f[R] not all file systems support sparse files.
In particular FAT/exFAT do not.
Rclone will perform very badly if the cache directory is on a filesystem
which doesn\[aq]t support sparse files and it will log an ERROR message
if one is detected.
.SS Fingerprinting
.PP
Various parts of the VFS use fingerprinting to see if a local file copy
has changed relative to a remote file.
Fingerprints are made from:
.IP \[bu] 2
size
.IP \[bu] 2
modification time
.IP \[bu] 2
hash
.PP
where available on an object.
.PP
On some backends some of these attributes are slow to read (they take an
extra API call per object, or extra work per object).
.PP
For example \f[V]hash\f[R] is slow with the \f[V]local\f[R] and
\f[V]sftp\f[R] backends as they have to read the entire file and hash
it, and \f[V]modtime\f[R] is slow with the \f[V]s3\f[R],
\f[V]swift\f[R], \f[V]ftp\f[R] and \f[V]qinqstor\f[R] backends because
they need to do an extra API call to fetch it.
.PP
If you use the \f[V]--vfs-fast-fingerprint\f[R] flag then rclone will
not include the slow operations in the fingerprint.
This makes the fingerprinting less accurate but much faster and will
improve the opening time of cached files.
.PP
If you are running a vfs cache over \f[V]local\f[R], \f[V]s3\f[R] or
\f[V]swift\f[R] backends then using this flag is recommended.
.PP
Note that if you change the value of this flag, the fingerprints of the
files in the cache may be invalidated and the files will need to be
downloaded again.
.SS VFS Chunked Reading
.PP
When rclone reads files from a remote it reads them in chunks.
This means that rather than requesting the whole file rclone reads the
chunk specified.
This can reduce the used download quota for some remotes by requesting
only chunks from the remote that are actually read, at the cost of an
increased number of requests.
.PP
These flags control the chunking:
.IP
.nf
\f[C]
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128M)
--vfs-read-chunk-size-limit SizeSuffix Max chunk doubling size (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
\f[R]
.fi
.PP
The chunking behaves differently depending on the
\f[V]--vfs-read-chunk-streams\f[R] parameter.
.SS \f[V]--vfs-read-chunk-streams\f[R] == 0
.PP
Rclone will start reading a chunk of size
\f[V]--vfs-read-chunk-size\f[R], and then double the size for each read.
When \f[V]--vfs-read-chunk-size-limit\f[R] is specified, and greater
than \f[V]--vfs-read-chunk-size\f[R], the chunk size for each open file
will get doubled only until the specified value is reached.
If the value is \[dq]off\[dq], which is the default, the limit is
disabled and the chunk size will grow indefinitely.
.PP
With \f[V]--vfs-read-chunk-size 100M\f[R] and
\f[V]--vfs-read-chunk-size-limit 0\f[R] the following parts will be
downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on.
When \f[V]--vfs-read-chunk-size-limit 500M\f[R] is specified, the result
would be 0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so
on.
.PP
Setting \f[V]--vfs-read-chunk-size\f[R] to \f[V]0\f[R] or \[dq]off\[dq]
disables chunked reading.
.PP
The chunks will not be buffered in memory.
.SS \f[V]--vfs-read-chunk-streams\f[R] > 0
.PP
Rclone reads \f[V]--vfs-read-chunk-streams\f[R] chunks of size
\f[V]--vfs-read-chunk-size\f[R] concurrently.
The size for each read will stay constant.
.PP
This improves performance massively on high latency links or very high
bandwidth links to high performance object stores.
.PP
Some experimentation will be needed to find the optimum values of
\f[V]--vfs-read-chunk-size\f[R] and \f[V]--vfs-read-chunk-streams\f[R]
as these will depend on the backend in use and the latency to the
backend.
.PP
For high performance object stores (eg AWS S3) a reasonable place to
start might be \f[V]--vfs-read-chunk-streams 16\f[R] and
\f[V]--vfs-read-chunk-size 4M\f[R].
In testing with AWS S3 the performance scaled roughly as the
\f[V]--vfs-read-chunk-streams\f[R] setting.
.PP
Similar settings should work for high latency links, but depending on
the latency they may need more \f[V]--vfs-read-chunk-streams\f[R] in
order to get the throughput.
.SS VFS Performance
.PP
These flags may be used to enable/disable features of the VFS for
performance or other reasons.
See also the chunked reading feature.
.PP
In particular S3 and Swift benefit hugely from the
\f[V]--no-modtime\f[R] flag (or use \f[V]--use-server-modtime\f[R] for a
slightly different effect) as each read of the modification time takes a
transaction.
.IP
.nf
\f[C]
--no-checksum Don\[aq]t compare checksums on up/download.
--no-modtime Don\[aq]t read/write the modification time (can speed things up).
--no-seek Don\[aq]t allow seeking in files.
--read-only Only allow read-only access.
\f[R]
.fi
.PP
Sometimes rclone is delivered reads or writes out of order.
Rather than seeking rclone will wait a short time for the in sequence
read or write to come in.
These flags only come into effect when not using an on disk cache file.
.IP
.nf
\f[C]
--vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
When using VFS write caching (\f[V]--vfs-cache-mode\f[R] with value
writes or full), the global flag \f[V]--transfers\f[R] can be set to
adjust the number of parallel uploads of modified files from the cache
(the related global flag \f[V]--checkers\f[R] has no effect on the VFS).
.IP
.nf
\f[C]
--transfers int Number of file transfers to run in parallel (default 4)
\f[R]
.fi
.SS Symlinks
.PP
By default the VFS does not support symlinks.
However this may be enabled with either of the following flags:
.IP
.nf
\f[C]
--links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension.
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
\f[R]
.fi
.PP
As most cloud storage systems do not support symlinks directly, rclone
stores the symlink as a normal file with a special extension.
So a file which appears as a symlink \f[V]link-to-file.txt\f[R] would be
stored on cloud storage as \f[V]link-to-file.txt.rclonelink\f[R] and the
contents would be the path to the symlink destination.
.PP
Note that \f[V]--links\f[R] enables symlink translation globally in
rclone - this includes any backend which supports the concept (for
example the local backend).
\f[V]--vfs-links\f[R] just enables it for the VFS layer.
.PP
This scheme is compatible with that used by the local backend with the
--local-links flag (https://rclone.org/local/#symlinks-junction-points).
.PP
The \f[V]--vfs-links\f[R] flag has been designed for
\f[V]rclone mount\f[R], \f[V]rclone nfsmount\f[R] and
\f[V]rclone serve nfs\f[R].
.PP
It hasn\[aq]t been tested with the other \f[V]rclone serve\f[R] commands
yet.
.PP
A limitation of the current implementation is that it expects the caller
to resolve sub-symlinks.
For example given this directory tree
.IP
.nf
\f[C]
\&.
├── dir
│\ \ └── file.txt
└── linked-dir -> dir
\f[R]
.fi
.PP
The VFS will correctly resolve \f[V]linked-dir\f[R] but not
\f[V]linked-dir/file.txt\f[R].
This is not a problem for the tested commands but may be for other
commands.
.PP
\f[B]Note\f[R] that there is an outstanding issue with symlink support
issue #8245 (https://github.com/rclone/rclone/issues/8245) with
duplicate files being created when symlinks are moved into directories
where there is a file of the same name (or vice versa).
.SS VFS Case Sensitivity
.PP
Linux file systems are case-sensitive: two files can differ only by
case, and the exact case must be used when opening a file.
.PP
File systems in modern Windows are case-insensitive but case-preserving:
although existing files can be opened using any case, the exact case
used to create the file is preserved and available for programs to
query.
It is not allowed for two files in the same directory to differ only by
case.
.PP
Usually file systems on macOS are case-insensitive.
It is possible to make macOS file systems case-sensitive but that is not
the default.
.PP
The \f[V]--vfs-case-insensitive\f[R] VFS flag controls how rclone
handles these two cases.
If its value is \[dq]false\[dq], rclone passes file names to the remote
as-is.
If the flag is \[dq]true\[dq] (or appears without a value on the command
line), rclone may perform a \[dq]fixup\[dq] as explained below.
.PP
The user may specify a file name to open/delete/rename/etc with a case
different than what is stored on the remote.
If an argument refers to an existing file with exactly the same name,
then the case of the existing file on the disk will be used.
However, if a file name with exactly the same name is not found but a
name differing only by case exists, rclone will transparently fixup the
name.
This fixup happens only when an existing file is requested.
Case sensitivity of file names created anew by rclone is controlled by
the underlying remote.
.PP
Note that case sensitivity of the operating system running rclone (the
target) may differ from case sensitivity of a file system presented by
rclone (the source).
The flag controls whether \[dq]fixup\[dq] is performed to satisfy the
target.
.PP
If the flag is not provided on the command line, then its default value
depends on the operating system where rclone runs: \[dq]true\[dq] on
Windows and macOS, \[dq]false\[dq] otherwise.
If the flag is provided without a value, then it is \[dq]true\[dq].
.PP
The \f[V]--no-unicode-normalization\f[R] flag controls whether a similar
\[dq]fixup\[dq] is performed for filenames that differ but are
canonically
equivalent (https://en.wikipedia.org/wiki/Unicode_equivalence) with
respect to unicode.
Unicode normalization can be particularly helpful for users of macOS,
which prefers form NFD instead of the NFC used by most other platforms.
It is therefore highly recommended to keep the default of
\f[V]false\f[R] on macOS, to avoid encoding compatibility issues.
.PP
In the (probably unlikely) event that a directory has multiple duplicate
filenames after applying case and unicode normalization, the
\f[V]--vfs-block-norm-dupes\f[R] flag allows hiding these duplicates.
This comes with a performance tradeoff, as rclone will have to scan the
entire directory for duplicates when listing a directory.
For this reason, it is recommended to leave this disabled if not needed.
However, macOS users may wish to consider using it, as otherwise, if a
remote directory contains both NFC and NFD versions of the same
filename, an odd situation will occur: both versions of the file will be
visible in the mount, and both will appear to be editable, however,
editing either version will actually result in only the NFD version
getting edited under the hood.
\f[V]--vfs-block- norm-dupes\f[R] prevents this confusion by detecting
this scenario, hiding the duplicates, and logging an error, similar to
how this is handled in \f[V]rclone sync\f[R].
.SS VFS Disk Options
.PP
This flag allows you to manually set the statistics about the filing
system.
It can be useful when those statistics cannot be read correctly
automatically.
.IP
.nf
\f[C]
--vfs-disk-space-total-size Manually set the total disk space size (example: 256G, default: -1)
\f[R]
.fi
.SS Alternate report of used bytes
.PP
Some backends, most notably S3, do not report the amount of bytes used.
If you need this information to be available when running \f[V]df\f[R]
on the filesystem, then pass the flag \f[V]--vfs-used-is-size\f[R] to
rclone.
With this flag set, instead of relying on the backend to report this
information, rclone will scan the whole remote similar to
\f[V]rclone size\f[R] and compute the total used space itself.
.PP
\f[B]WARNING\f[R]: Contrary to \f[V]rclone size\f[R], this flag ignores
filters so that the result is accurate.
However, this is very inefficient and may cost lots of API calls
resulting in extra charges.
Use it as a last resort and only with caching.
.SS VFS Metadata
.PP
If you use the \f[V]--vfs-metadata-extension\f[R] flag you can get the
VFS to expose files which contain the
metadata (https://rclone.org/docs/#metadata) as a JSON blob.
These files will not appear in the directory listing, but can be
\f[V]stat\f[R]-ed and opened and once they have been they \f[B]will\f[R]
appear in directory listings until the directory cache expires.
.PP
Note that some backends won\[aq]t create metadata unless you pass in the
\f[V]--metadata\f[R] flag.
.PP
For example, using \f[V]rclone mount\f[R] with
\f[V]--metadata --vfs-metadata-extension .metadata\f[R] we get
.IP
.nf
\f[C]
$ ls -l /mnt/
total 1048577
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
$ cat /mnt/1G.metadata
{
\[dq]atime\[dq]: \[dq]2025-03-04T17:34:22.317069787Z\[dq],
\[dq]btime\[dq]: \[dq]2025-03-03T16:03:37.708253808Z\[dq],
\[dq]gid\[dq]: \[dq]1000\[dq],
\[dq]mode\[dq]: \[dq]100664\[dq],
\[dq]mtime\[dq]: \[dq]2025-03-03T16:03:39.640238323Z\[dq],
\[dq]uid\[dq]: \[dq]1000\[dq]
}
$ ls -l /mnt/
total 1048578
-rw-rw-r-- 1 user user 1073741824 Mar 3 16:03 1G
-rw-rw-r-- 1 user user 185 Mar 3 16:03 1G.metadata
\f[R]
.fi
.PP
If the file has no metadata it will be returned as \f[V]{}\f[R] and if
there is an error reading the metadata the error will be returned as
\f[V]{\[dq]error\[dq]:\[dq]error string\[dq]}\f[R].
.SS Auth Proxy
.PP
If you supply the parameter \f[V]--auth-proxy /path/to/program\f[R] then
rclone will use that program to generate backends on the fly which then
are used to authenticate incoming requests.
This uses a simple JSON based protocol with input on STDIN and output on
STDOUT.
.PP
\f[B]PLEASE NOTE:\f[R] \f[V]--auth-proxy\f[R] and
\f[V]--authorized-keys\f[R] cannot be used together, if
\f[V]--auth-proxy\f[R] is set the authorized keys option will be
ignored.
.PP
There is an example program
bin/test_proxy.py (https://github.com/rclone/rclone/blob/master/bin/test_proxy.py)
in the rclone source code.
.PP
The program\[aq]s job is to take a \f[V]user\f[R] and \f[V]pass\f[R] on
the input and turn those into the config for a backend on STDOUT in JSON
format.
This config will have any default parameters for the backend added, but
it won\[aq]t use configuration from environment variables or command
line options - it is the job of the proxy program to make a complete
config.
.PP
This config generated must have this extra parameter
.IP \[bu] 2
\f[V]_root\f[R] - root to use for the backend
.PP
And it may have these parameters
.IP \[bu] 2
\f[V]_obscure\f[R] - comma separated strings for parameters to obscure
.IP \[bu] 2
\f[V]_secret_access_key\f[R] - the secret for S3 access key auth (see
below)
.PP
If password authentication was used by the client, input to the proxy
process (on STDIN) would look similar to this:
.IP
.nf
\f[C]
{
\[dq]user\[dq]: \[dq]me\[dq],
\[dq]pass\[dq]: \[dq]mypassword\[dq],
\[dq]client_ip\[dq]: \[dq]192.168.1.1\[dq]
}
\f[R]
.fi
.PP
If public-key authentication was used by the client, input to the proxy
process (on STDIN) would look similar to this:
.IP
.nf
\f[C]
{
\[dq]user\[dq]: \[dq]me\[dq],
\[dq]public_key\[dq]: \[dq]AAAAB3NzaC1yc2EAAAADAQABAAABAQDuwESFdAe14hVS6omeyX7edc...JQdf\[dq],
\[dq]client_ip\[dq]: \[dq]192.168.1.1\[dq]
}
\f[R]
.fi
.PP
If the client authenticated with an S3 access key
(\f[V]rclone serve s3\f[R]), the client never sends its secret, only a
signature made with it, so the input contains just the access key ID as
the \f[V]user\f[R] with no \f[V]pass\f[R] or \f[V]public_key\f[R]:
.IP
.nf
\f[C]
{
\[dq]user\[dq]: \[dq]AKIAIOSFODNN7EXAMPLE\[dq],
\[dq]client_ip\[dq]: \[dq]192.168.1.1\[dq]
}
\f[R]
.fi
.PP
In this case the program must look up the secret access key for that
access key ID and return it in the \f[V]_secret_access_key\f[R] field of
the output.
Rclone then uses that secret to verify the signature on the request,
refusing the request if it does not match.
This means the proxy program is the source of truth for both the
credentials and the backend they map to.
If the program does not return \f[V]_secret_access_key\f[R] or returns
it empty the request is refused.
.PP
The program\[aq]s answer for an access key ID is cached (see below) but
is checked with the program again after 5 minutes even if the access key
ID is in constant use, so revoking an access key ID in the program takes
effect within 5 minutes.
A rotated secret takes effect on the first request signed with it.
.PP
The \f[V]client_ip\f[R] key holds the IP address the client connected
from, without a port number.
It can be used to restrict logins to certain networks, or to log
authentication attempts centrally.
It is omitted if the client has no IP address, for example when
connecting over a unix socket.
Note that if rclone is behind a reverse proxy this will be the address
of the reverse proxy and not the original client.
.PP
And as an example return this on STDOUT
.IP
.nf
\f[C]
{
\[dq]type\[dq]: \[dq]sftp\[dq],
\[dq]_root\[dq]: \[dq]\[dq],
\[dq]_obscure\[dq]: \[dq]pass\[dq],
\[dq]user\[dq]: \[dq]me\[dq],
\[dq]pass\[dq]: \[dq]mypassword\[dq],
\[dq]host\[dq]: \[dq]sftp.example.com\[dq]
}
\f[R]
.fi
.PP
This would mean that an SFTP backend would be created on the fly for the
\f[V]user\f[R] and \f[V]pass\f[R]/\f[V]public_key\f[R] returned in the
output to the host given.
Note that since \f[V]_obscure\f[R] is set to \f[V]pass\f[R], rclone will
obscure the \f[V]pass\f[R] parameter before creating the backend (which
is required for sftp backends).
.PP
The program can manipulate the supplied \f[V]user\f[R] in any way, for
example to make proxy to many different sftp backends, you could make
the \f[V]user\f[R] be \f[V]user\[at]example.com\f[R] and then set the
\f[V]host\f[R] to \f[V]example.com\f[R] in the output and the user to
\f[V]user\f[R].
For security you\[aq]d probably want to restrict the \f[V]host\f[R] to a
limited list.
.PP
An internal cache of backends is keyed on the \f[V]user\f[R], the kind
of credential presented, a hash of the \f[V]pass\f[R] or
\f[V]public_key\f[R], and the \f[V]client_ip\f[R].
This means that if a user\[aq]s password or public-key changes, the
client connects from a new IP address, or the proxy returns different
config parameters (eg a rotated \f[V]api_key\f[R]), a fresh backend will
be created on the next request rather than the cached one being reused.
A backend created for a public key login is never reused for a password
login, so a public key cannot be sent as a password to skip the program.
.PP
A cached answer is checked with the program again after 5 minutes even
if the user is in constant use, so revoking a user in the program takes
effect within 5 minutes.
For \f[V]serve sftp\f[R] this applies to new logins - an existing
connection is not closed.
.PP
This can be used to build general purpose proxies to any kind of backend
that rclone supports.
.IP
.nf
\f[C]
rclone serve webdav remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--addr stringArray IPaddress:Port or :Port to bind server to (default 127.0.0.1:8080)
--allow-origin string Origin which cross-domain request (CORS) can be executed from
--auth-proxy string A program to use to create the backend from the auth
--baseurl string Prefix for URLs - leave blank for root
--cert string TLS PEM key (concatenation of certificate and CA certificate)
--client-ca string Client certificate authority to verify clients with
--dir-cache-time Duration Time to cache directory entries for (default 5m0s)
--dir-perms FileMode Directory permissions (default 777)
--disable-dir-list Disable HTML directory list on GET request for a directory
--disable-zip Disable zip download of directories
--etag-hash string Which hash to use for the ETag, or auto or blank for off
--file-perms FileMode File permissions (default 666)
--gid uint32 Override the gid field set by the filesystem (not supported on Windows) (default 1000)
-h, --help help for webdav
--htpasswd string A htpasswd file - if not provided no authentication is done
--key string TLS PEM Private key
--link-perms FileMode Link permissions (default 666)
--max-header-bytes int Maximum size of request header (default 4096)
--min-tls-version string Minimum TLS version that is acceptable (default \[dq]tls1.0\[dq])
--no-checksum Don\[aq]t compare checksums on up/download
--no-modtime Don\[aq]t read/write the modification time (can speed things up)
--no-seek Don\[aq]t allow seeking in files
--pass string Password for authentication
--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)
--read-only Only allow read-only access
--realm string Realm for authentication
--response-header stringArray Set HTTP header for all responses, overriding existing values
--salt string Password hashing salt (default \[dq]dlPL2MqE\[dq])
--server-read-timeout Duration Timeout for server reading data (default 1h0m0s)
--server-write-timeout Duration Timeout for server writing data (default 1h0m0s)
--template string User-specified template
--uid uint32 Override the uid field set by the filesystem (not supported on Windows) (default 1000)
--umask FileMode Override the permission bits set by the filesystem (not supported on Windows) (default 002)
--user string User name for authentication
--user-from-header string User name from a defined HTTP header
--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)
--vfs-cache-max-age Duration Max time since last access of objects in the cache (default 1h0m0s)
--vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off)
--vfs-cache-min-free-space SizeSuffix Target minimum free space on the disk containing the cache (default off)
--vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off)
--vfs-cache-poll-interval Duration Interval to poll the cache for stale objects (default 1m0s)
--vfs-case-insensitive If a file name not found, find a case insensitive match
--vfs-disk-space-total-size SizeSuffix Specify the total space of disk (default off)
--vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection
--vfs-handle-caching Duration Time to keep file handle and downloaders alive after last close (default 5s)
--vfs-links Translate symlinks to/from regular files with a \[aq].rclonelink\[aq] extension for the VFS
--vfs-metadata-extension string Set the extension to read metadata from
--vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full
--vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi)
--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 (\[aq]off\[aq] is unlimited) (default off)
--vfs-read-chunk-streams int The number of parallel streams to read at once
--vfs-read-wait Duration Time to wait for in-sequence read before seeking (default 20ms)
--vfs-refresh Refreshes the directory cache recursively in the background on start
--vfs-used-is-size rclone size Use the rclone size algorithm for Used size
--vfs-write-back Duration Time to writeback files after last use when using cache (default 5s)
--vfs-write-wait Duration Time to wait for in-sequence write before giving error (default 1s)
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone serve (https://rclone.org/commands/rclone_serve/) - Serve a
remote over a protocol.
.SH rclone settier
.PP
Changes storage class/tier of objects in remote.
.SS Synopsis
.PP
Changes storage tier or class at remote if supported.
Few cloud storage services provides different storage classes on
objects, for example AWS S3 and Glacier, Azure Blob storage - Hot, Cool
and Archive, Google Cloud Storage, Regional Storage, Nearline, Coldline
etc.
.PP
Note that, certain tier changes make objects not available to access
immediately.
For example tiering to archive in azure blob storage makes objects in
frozen state, user can restore by setting tier to Hot/Cool, similarly S3
to Glacier makes object inaccessible.true
.PP
You can use it to tier single object
.IP
.nf
\f[C]
rclone settier Cool remote:path/file
\f[R]
.fi
.PP
Or use rclone filters to set tier on only specific files
.IP
.nf
\f[C]
rclone --include \[dq]*.txt\[dq] settier Hot remote:path/dir
\f[R]
.fi
.PP
Or just provide remote directory and all files in directory will be
tiered
.IP
.nf
\f[C]
rclone settier tier remote:path/dir
\f[R]
.fi
.IP
.nf
\f[C]
rclone settier tier remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for settier
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone test
.PP
Run a test command
.SS Synopsis
.PP
Rclone test is used to run test commands.
.PP
Select which test command you want with the subcommand, eg
.IP
.nf
\f[C]
rclone test memory remote:
\f[R]
.fi
.PP
Each subcommand has its own options which you can see in their help.
.PP
\f[B]NB\f[R] Be careful running these commands, they may do strange
things so reading their documentation first is recommended.
.SS Options
.IP
.nf
\f[C]
-h, --help help for test
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.IP \[bu] 2
rclone test
changenotify (https://rclone.org/commands/rclone_test_changenotify/) -
Log any change notify requests for the remote passed in.
.IP \[bu] 2
rclone test
histogram (https://rclone.org/commands/rclone_test_histogram/) - Makes a
histogram of file name characters.
.IP \[bu] 2
rclone test info (https://rclone.org/commands/rclone_test_info/) -
Discovers file name or other limitations for paths.
.IP \[bu] 2
rclone test makefile (https://rclone.org/commands/rclone_test_makefile/)
- Make files with random contents of the size given
.IP \[bu] 2
rclone test
makefiles (https://rclone.org/commands/rclone_test_makefiles/) - Make a
random file hierarchy in a directory
.IP \[bu] 2
rclone test memory (https://rclone.org/commands/rclone_test_memory/) -
Load all the objects at remote:path into memory and report memory stats.
.IP \[bu] 2
rclone test speed (https://rclone.org/commands/rclone_test_speed/) - Run
a speed test to the remote
.SH rclone test changenotify
.PP
Log any change notify requests for the remote passed in.
.IP
.nf
\f[C]
rclone test changenotify remote: [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for changenotify
--poll-interval Duration Time to wait between polling for changes (default 10s)
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone test (https://rclone.org/commands/rclone_test/) - Run a test
command
.SH rclone test histogram
.PP
Makes a histogram of file name characters.
.SS Synopsis
.PP
This command outputs JSON which shows the histogram of characters used
in filenames in the remote:path specified.
.PP
The data doesn\[aq]t contain any identifying information but is useful
for the rclone developers when developing filename compression.
.IP
.nf
\f[C]
rclone test histogram [remote:path] [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for histogram
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone test (https://rclone.org/commands/rclone_test/) - Run a test
command
.SH rclone test info
.PP
Discovers file name or other limitations for paths.
.SS Synopsis
.PP
Discovers what filenames and upload methods are possible to write to the
paths passed in and how long they can be.
It can take some time.
It will write test files into the remote:path passed in.
It outputs a bit of go code for each one.
.PP
\f[B]NB\f[R] this can create undeletable files and other hazards - use
with care!
.IP
.nf
\f[C]
rclone test info [remote:path]+ [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--all Run all tests
--check-base32768 Check can store all possible base32768 characters
--check-control Check control characters
--check-length Check max filename length
--check-normalization Check UTF-8 Normalization
--check-streaming Check uploads with indeterminate file size
-h, --help help for info
--keep-test-files Keep test files after execution
--upload-wait Duration Wait after writing a file (default 0s)
--write-json string Write results to file
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone test (https://rclone.org/commands/rclone_test/) - Run a test
command
.SH rclone test makefile
.PP
Make files with random contents of the size given
.IP
.nf
\f[C]
rclone test makefile <size> [<file>]+ [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--ascii Fill files with random ASCII printable bytes only
--chargen Fill files with a ASCII chargen pattern
-h, --help help for makefile
--pattern Fill files with a periodic pattern
--seed int Seed for the random number generator (0 for random) (default 1)
--sparse Make the files sparse (appear to be filled with ASCII 0x00)
--zero Fill files with ASCII 0x00
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone test (https://rclone.org/commands/rclone_test/) - Run a test
command
.SH rclone test makefiles
.PP
Make a random file hierarchy in a directory
.IP
.nf
\f[C]
rclone test makefiles <dir> [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--ascii Fill files with random ASCII printable bytes only
--chargen Fill files with a ASCII chargen pattern
--files int Number of files to create (default 1000)
--files-per-directory int Average number of files per directory (default 10)
--flat If set create all files in the root directory
-h, --help help for makefiles
--max-depth int Maximum depth of directory hierarchy (default 10)
--max-file-size SizeSuffix Maximum size of files to create (default 100)
--max-name-length int Maximum size of file names (default 12)
--min-file-size SizeSuffix Minimum size of file to create
--min-name-length int Minimum size of file names (default 4)
--pattern Fill files with a periodic pattern
--seed int Seed for the random number generator (0 for random) (default 1)
--sparse Make the files sparse (appear to be filled with ASCII 0x00)
--zero Fill files with ASCII 0x00
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone test (https://rclone.org/commands/rclone_test/) - Run a test
command
.SH rclone test memory
.PP
Load all the objects at remote:path into memory and report memory stats.
.IP
.nf
\f[C]
rclone test memory remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for memory
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone test (https://rclone.org/commands/rclone_test/) - Run a test
command
.SH rclone test speed
.PP
Run a speed test to the remote
.SS Synopsis
.PP
Run a speed test to the remote.
.PP
This command runs a series of uploads and downloads to the remote,
measuring and printing the speed of each test using varying file sizes
and numbers of files.
.PP
Test time can be inaccurate with small file caps and large files.
As it uses the results of an initial test to determine how many files to
use in each subsequent test.
.PP
It is recommended to use -q flag for a simpler output.
e.g.:
.IP
.nf
\f[C]
rclone test speed remote: -q
\f[R]
.fi
.PP
\f[B]NB\f[R] This command will create and delete files on the remote in
a randomly named directory which will be automatically removed on a
clean exit.
.PP
You can use the --json flag to only print the results in JSON format.
.IP
.nf
\f[C]
rclone test speed <remote> [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
--ascii Fill files with random ASCII printable bytes only
--chargen Fill files with a ASCII chargen pattern
--file-cap int Maximum number of files to use in each test (default 100)
-h, --help help for speed
--json Output only results in JSON format
--large SizeSuffix Size of large files (default 1Gi)
--medium SizeSuffix Size of medium files (default 10Mi)
--pattern Fill files with a periodic pattern
--seed int Seed for the random number generator (0 for random) (default 1)
--small SizeSuffix Size of small files (default 1Ki)
--sparse Make the files sparse (appear to be filled with ASCII 0x00)
--test-time Duration Length for each test to run (default 15s)
--zero Fill files with ASCII 0x00
\f[R]
.fi
.PP
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS See Also
.IP \[bu] 2
rclone test (https://rclone.org/commands/rclone_test/) - Run a test
command
.SH rclone touch
.PP
Create new file or change file modification time.
.SS Synopsis
.PP
Set the modification time on file(s) as specified by remote:path to have
the current time.
.PP
If remote:path does not exist then a zero sized file will be created,
unless \f[V]--no-create\f[R] or \f[V]--recursive\f[R] is provided.
.PP
If \f[V]--recursive\f[R] is used then recursively sets the modification
time on all existing files that is found under the path.
Filters are supported, and you can test with the \f[V]--dry-run\f[R] or
the \f[V]--interactive\f[R]/\f[V]-i\f[R] flag.
This will touch \f[V]--transfers\f[R] files concurrently.
.PP
If \f[V]--timestamp\f[R] is used then sets the modification time to that
time instead of the current time.
Times may be specified as one of:
.IP \[bu] 2
\[aq]YYMMDD\[aq] - e.g.
171030
.IP \[bu] 2
\[aq]YYYY-MM-DD\[aq] - e.g.
2006-01-02
.IP \[bu] 2
\[aq]YYYY-MM-DDTHH:MM:SS\[aq] - e.g.
2006-01-02T15:04:05
.IP \[bu] 2
\[aq]YYYY-MM-DDTHH:MM:SS.SSS\[aq] - e.g.
2006-01-02T15:04:05.123456789
.IP \[bu] 2
\[aq]YYYY-MM-DDTHH:MM:SSZ\[aq] - e.g.
2006-01-02T15:04:05Z
.PP
Note that value of \f[V]--timestamp\f[R] is in UTC.
If you want local time then add the \f[V]--localtime\f[R] flag.
.PP
Metadata can be added when creating a new file with
\f[V]--metadata-set\f[R].
For example: rclone touch remote:path -M --metadata-set key=value
.IP
.nf
\f[C]
rclone touch remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-h, --help help for touch
--localtime Use localtime for timestamp, not UTC
-C, --no-create Do not create the file if it does not exist (implied with --recursive)
-R, --recursive Recursively touch all files
-t, --timestamp string Use specified time instead of the current time of day
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Important Options
.PP
Important flags useful for most commands
.IP
.nf
\f[C]
-n, --dry-run Do a trial run with no permanent changes
-i, --interactive Enable interactive mode
-v, --verbose count Print lots more stuff (repeat for more)
\f[R]
.fi
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SH rclone tree
.PP
List the contents of the remote in a tree like fashion.
.SS Synopsis
.PP
Lists the contents of a remote in a similar way to the unix tree
command.
.PP
For example
.IP
.nf
\f[C]
$ rclone tree remote:path
/
├── file1
├── file2
├── file3
└── subdir
├── file4
└── file5
1 directories, 5 files
\f[R]
.fi
.PP
You can use any of the filtering options with the tree command (e.g.
\f[V]--include\f[R] and \f[V]--exclude\f[R].
You can also use \f[V]--fast-list\f[R].
.PP
The tree command has many options for controlling the listing which are
compatible with the tree command, for example you can include file sizes
with \f[V]--size\f[R].
Note that not all of them have short options as they conflict with
rclone\[aq]s short options.
.PP
For a more interactive navigation of the remote see the
ncdu (https://rclone.org/commands/rclone_ncdu/) command.
.IP
.nf
\f[C]
rclone tree remote:path [flags]
\f[R]
.fi
.SS Options
.IP
.nf
\f[C]
-a, --all All files are listed (list . files too)
-d, --dirs-only List directories only
--dirsfirst List directories before files (-U disables)
--full-path Print the full path prefix for each file
-h, --help help for tree
--level int Descend only level directories deep
-D, --modtime Print the date of last modification.
--noindent Don\[aq]t print indentation lines
--noreport Turn off file/directory count at end of tree listing
-o, --output string Output to file instead of stdout
-p, --protections Print the protections for each file.
-Q, --quote Quote filenames with double quotes.
-s, --size Print the size in bytes of each file.
--sort string Select sort: name,version,size,mtime,ctime
--sort-ctime Sort files by last status change time
-t, --sort-modtime Sort files by last modification time
-r, --sort-reverse Reverse the order of the sort
-U, --unsorted Leave files unsorted
--version Sort files alphanumerically by version
\f[R]
.fi
.PP
Options shared with other commands are described next.
See the global flags page (https://rclone.org/flags/) for global options
not listed here.
.SS Filter Options
.PP
Flags for filtering directory listings
.IP
.nf
\f[C]
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
--files-from0 stringArray Read list of source-file names from file using NUL as separator (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--hash-filter string Partition filenames by hash k/n or randomly \[at]/n
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
\f[R]
.fi
.SS Listing Options
.PP
Flags for listing directories
.IP
.nf
\f[C]
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
\f[R]
.fi
.SS See Also
.IP \[bu] 2
rclone (https://rclone.org/commands/rclone/) - Show help for rclone
commands, flags and backends.
.SS Copying single files
.PP
rclone normally syncs or copies directories.
However, if the source remote points to a file, rclone will just copy
that file.
The destination remote must point to a directory - rclone will give the
error
\f[V]Failed to create file system for \[dq]remote:file\[dq]: is a file not a directory\f[R]
if it isn\[aq]t.
.PP
For example, suppose you have a remote with a file in called
\f[V]test.jpg\f[R], then you could copy just that file like this
.IP
.nf
\f[C]
rclone copy remote:test.jpg /tmp/download
\f[R]
.fi
.PP
The file \f[V]test.jpg\f[R] will be placed inside
\f[V]/tmp/download\f[R].
.PP
This is equivalent to specifying
.IP
.nf
\f[C]
rclone copy --files-from /tmp/files remote: /tmp/download
\f[R]
.fi
.PP
Where \f[V]/tmp/files\f[R] contains the single line
.IP
.nf
\f[C]
test.jpg
\f[R]
.fi
.PP
It is recommended to use \f[V]copy\f[R] when copying individual files,
not \f[V]sync\f[R].
They have pretty much the same effect but \f[V]copy\f[R] will use a lot
less memory.
.SS Syntax of remote paths
.PP
The syntax of the paths passed to the rclone command are as follows.
.SS /path/to/dir
.PP
This refers to the local file system.
.PP
On Windows \f[V]\[rs]\f[R] may be used instead of \f[V]/\f[R] in local
paths \f[B]only\f[R], non local paths must use \f[V]/\f[R].
See local filesystem (https://rclone.org/local/#paths-on-windows)
documentation for more about Windows-specific paths.
.PP
These paths needn\[aq]t start with a leading \f[V]/\f[R] - if they
don\[aq]t then they will be relative to the current directory.
.SS remote:path/to/dir
.PP
This refers to a directory \f[V]path/to/dir\f[R] on \f[V]remote:\f[R] as
defined in the config file (configured with \f[V]rclone config\f[R]).
.SS remote:/path/to/dir
.PP
On most backends this is refers to the same directory as
\f[V]remote:path/to/dir\f[R] and that format should be preferred.
On a very small number of remotes (FTP, SFTP, Dropbox for business) this
will refer to a different directory.
On these, paths without a leading \f[V]/\f[R] will refer to your
\[dq]home\[dq] directory and paths with a leading \f[V]/\f[R] will refer
to the root.
.SS :backend:path/to/dir
.PP
This is an advanced form for creating remotes on the fly.
\f[V]backend\f[R] should be the name or prefix of a backend (the
\f[V]type\f[R] in the config file) and all the configuration for the
backend should be provided on the command line (or in environment
variables).
.PP
Here are some examples:
.IP
.nf
\f[C]
rclone lsd --http-url https://pub.rclone.org :http:
\f[R]
.fi
.PP
To list all the directories in the root of
\f[V]https://pub.rclone.org/\f[R].
.IP
.nf
\f[C]
rclone lsf --http-url https://example.com :http:path/to/dir
\f[R]
.fi
.PP
To list files and directories in
\f[V]https://example.com/path/to/dir/\f[R]
.IP
.nf
\f[C]
rclone copy --http-url https://example.com :http:path/to/dir /tmp/dir
\f[R]
.fi
.PP
To copy files and directories in
\f[V]https://example.com/path/to/dir\f[R] to \f[V]/tmp/dir\f[R].
.IP
.nf
\f[C]
rclone copy --sftp-host example.com :sftp:path/to/dir /tmp/dir
\f[R]
.fi
.PP
To copy files and directories from \f[V]example.com\f[R] in the relative
directory \f[V]path/to/dir\f[R] to \f[V]/tmp/dir\f[R] using sftp.
.SS Connection strings
.PP
The above examples can also be written using a connection string syntax,
so instead of providing the arguments as command line parameters
\f[V]--http-url https://pub.rclone.org\f[R] they are provided as part of
the remote specification as a kind of connection string.
.IP
.nf
\f[C]
rclone lsd \[dq]:http,url=\[aq]https://pub.rclone.org\[aq]:\[dq]
rclone lsf \[dq]:http,url=\[aq]https://example.com\[aq]:path/to/dir\[dq]
rclone copy \[dq]:http,url=\[aq]https://example.com\[aq]:path/to/dir\[dq] /tmp/dir
rclone copy :sftp,host=example.com:path/to/dir /tmp/dir
\f[R]
.fi
.PP
These can apply to modify existing remotes as well as create new remotes
with the on the fly syntax.
This example is equivalent to adding the
\f[V]--drive-shared-with-me\f[R] parameter to the remote
\f[V]gdrive:\f[R].
.IP
.nf
\f[C]
rclone lsf \[dq]gdrive,shared_with_me:path/to/dir\[dq]
\f[R]
.fi
.PP
The major advantage to using the connection string style syntax is that
it only applies to the remote, not to all the remotes of that type of
the command line.
A common confusion is this attempt to copy a file shared on google drive
to the normal drive which \f[B]does not work\f[R] because the
\f[V]--drive-shared-with-me\f[R] flag applies to both the source and the
destination.
.IP
.nf
\f[C]
rclone copy --drive-shared-with-me gdrive:shared-file.txt gdrive:
\f[R]
.fi
.PP
However using the connection string syntax, this does work.
.IP
.nf
\f[C]
rclone copy \[dq]gdrive,shared_with_me:shared-file.txt\[dq] gdrive:
\f[R]
.fi
.PP
Note that the connection string only affects the options of the
immediate backend.
If for example gdriveCrypt is a crypt based on gdrive, then the
following command \f[B]will not work\f[R] as intended, because
\f[V]shared_with_me\f[R] is ignored by the crypt backend:
.IP
.nf
\f[C]
rclone copy \[dq]gdriveCrypt,shared_with_me:shared-file.txt\[dq] gdriveCrypt:
\f[R]
.fi
.PP
The connection strings have the following syntax
.IP
.nf
\f[C]
remote,parameter=value,parameter2=value2:path/to/dir
:backend,parameter=value,parameter2=value2:path/to/dir
\f[R]
.fi
.PP
If the \f[V]parameter\f[R] has a \f[V]:\f[R] or \f[V],\f[R] then it must
be placed in quotes \f[V]\[dq]\f[R] or \f[V]\[aq]\f[R], so
.IP
.nf
\f[C]
remote,parameter=\[dq]colon:value\[dq],parameter2=\[dq]comma,value\[dq]:path/to/dir
:backend,parameter=\[aq]colon:value\[aq],parameter2=\[aq]comma,value\[aq]:path/to/dir
\f[R]
.fi
.PP
If a quoted value needs to include that quote, then it should be
doubled, so
.IP
.nf
\f[C]
remote,parameter=\[dq]with\[dq]\[dq]quote\[dq],parameter2=\[aq]with\[aq]\[aq]quote\[aq]:path/to/dir
\f[R]
.fi
.PP
This will make \f[V]parameter\f[R] be \f[V]with\[dq]quote\f[R] and
\f[V]parameter2\f[R] be \f[V]with\[aq]quote\f[R].
.PP
If you leave off the \f[V]=parameter\f[R] then rclone will substitute
\f[V]=true\f[R] which works very well with flags.
For example, to use s3 configured in the environment you could use:
.IP
.nf
\f[C]
rclone lsd :s3,env_auth:
\f[R]
.fi
.PP
Which is equivalent to
.IP
.nf
\f[C]
rclone lsd :s3,env_auth=true:
\f[R]
.fi
.PP
Note that on the command line you might need to surround these
connection strings with \f[V]\[dq]\f[R] or \f[V]\[aq]\f[R] to stop the
shell interpreting any special characters within them.
.PP
If you are a shell master then you\[aq]ll know which strings are OK and
which aren\[aq]t, but if you aren\[aq]t sure then enclose them in
\f[V]\[dq]\f[R] and use \f[V]\[aq]\f[R] as the inside quote.
This syntax works on all OSes.
.IP
.nf
\f[C]
rclone copy \[dq]:http,url=\[aq]https://example.com\[aq]:path/to/dir\[dq] /tmp/dir
\f[R]
.fi
.PP
On Linux/macOS some characters are still interpreted inside
\f[V]\[dq]\f[R] strings in the shell (notably \f[V]\[rs]\f[R] and
\f[V]$\f[R] and \f[V]\[dq]\f[R]) so if your strings contain those you
can swap the roles of \f[V]\[dq]\f[R] and \f[V]\[aq]\f[R] thus.
(This syntax does not work on Windows.)
.IP
.nf
\f[C]
rclone copy \[aq]:http,url=\[dq]https://example.com\[dq]:path/to/dir\[aq] /tmp/dir
\f[R]
.fi
.PP
You can use rclone config
string (https://rclone.org/commands/rclone_config_string/) to convert a
remote into a connection string.
.SS Connection strings, config and logging
.PP
If you supply extra configuration to a backend by command line flag,
environment variable or connection string then rclone will add a suffix
based on the hash of the config to the name of the remote, eg
.IP
.nf
\f[C]
rclone -vv lsf --s3-chunk-size 20M s3:
\f[R]
.fi
.PP
Has the log message
.IP
.nf
\f[C]
DEBUG : s3: detected overridden config - adding \[dq]{Srj1p}\[dq] suffix to name
\f[R]
.fi
.PP
This is so rclone can tell the modified remote apart from the unmodified
remote when caching the backends.
.PP
This should only be noticeable in the logs.
.PP
This means that on the fly backends such as
.IP
.nf
\f[C]
rclone -vv lsf :s3,env_auth:
\f[R]
.fi
.PP
Will get their own names
.IP
.nf
\f[C]
DEBUG : :s3: detected overridden config - adding \[dq]{YTu53}\[dq] suffix to name
\f[R]
.fi
.SS Valid remote names
.PP
Remote names are case sensitive, and must adhere to the following rules:
.IP \[bu] 2
May contain number, letter, \f[V]_\f[R], \f[V]-\f[R], \f[V].\f[R],
\f[V]+\f[R], \f[V]\[at]\f[R] and space.
.IP \[bu] 2
May not start with \f[V]-\f[R] or space.
.IP \[bu] 2
May not end with space.
.PP
Starting with rclone version 1.61, any Unicode numbers and letters are
allowed, while in older versions it was limited to plain ASCII (0-9,
A-Z, a-z).
If you use the same rclone configuration from different shells, which
may be configured with different character encoding, you must be
cautious to use characters that are possible to write in all of them.
This is mostly a problem on Windows, where the console traditionally
uses a non-Unicode character set - defined by the so-called \[dq]code
page\[dq].
.PP
If you want to configure a remote using environment variables then its
name becomes part of the environment variable name, which in practice
restricts the characters you can use in it.
See the Config file section under Environment variables for details.
.PP
Do not use single character names on Windows as it creates ambiguity
with Windows drives\[aq] names, e.g.: remote called \f[V]C\f[R] is
indistinguishable from \f[V]C\f[R] drive.
Rclone will always assume that single letter name refers to a drive.
.SS Adding global configuration to a remote
.PP
It is possible to add global configuration to the remote configuration
which will be applied just before the remote is created.
.PP
This can be done in two ways.
The first is to use \f[V]override.var = value\f[R] in the config file or
the connection string for a temporary change, and the second is to use
\f[V]global.var = value\f[R] in the config file or connection string for
a permanent change.
.PP
This is explained fully below.
.SS override.var
.PP
This is used to override a global variable \f[B]just\f[R] for the
duration of the remote creation.
It won\[aq]t affect other remotes even if they are created at the same
time.
.PP
This is very useful for overriding networking config needed for just for
that remote.
For example, say you have a remote which needs
\f[V]--no-check-certificate\f[R] as it is running on test infrastructure
without a proper certificate.
You could supply the \f[V]--no-check-certificate\f[R] flag to rclone,
but this will affect \f[B]all\f[R] the remotes.
To make it just affect this remote you use an override.
You could put this in the config file:
.IP
.nf
\f[C]
[remote]
type = XXX
\&...
override.no_check_certificate = true
\f[R]
.fi
.PP
or use it in the connection string
\f[V]remote,override.no_check_certificate=true:\f[R] (or just
\f[V]remote,override.no_check_certificate:\f[R]).
.PP
Note how the global flag name loses its initial \f[V]--\f[R] and gets
\f[V]-\f[R] replaced with \f[V]_\f[R] and gets an \f[V]override.\f[R]
prefix.
.PP
Not all global variables make sense to be overridden like this as the
config is only applied during the remote creation.
Here is a non exhaustive list of ones which might be useful:
.IP \[bu] 2
\f[V]allow_https_downgrade\f[R]
.IP \[bu] 2
\f[V]bind_addr\f[R]
.IP \[bu] 2
\f[V]ca_cert\f[R]
.IP \[bu] 2
\f[V]client_cert\f[R]
.IP \[bu] 2
\f[V]client_key\f[R]
.IP \[bu] 2
\f[V]connect_timeout\f[R]
.IP \[bu] 2
\f[V]disable_http2\f[R]
.IP \[bu] 2
\f[V]disable_http_keep_alives\f[R]
.IP \[bu] 2
\f[V]dump\f[R]
.IP \[bu] 2
\f[V]expect_continue_timeout\f[R]
.IP \[bu] 2
\f[V]headers\f[R]
.IP \[bu] 2
\f[V]http_proxy\f[R]
.IP \[bu] 2
\f[V]low_level_retries\f[R]
.IP \[bu] 2
\f[V]max_connections\f[R]
.IP \[bu] 2
\f[V]no_check_certificate\f[R]
.IP \[bu] 2
\f[V]no_gzip\f[R]
.IP \[bu] 2
\f[V]timeout\f[R]
.IP \[bu] 2
\f[V]traffic_class\f[R]
.IP \[bu] 2
\f[V]use_cookies\f[R]
.IP \[bu] 2
\f[V]use_server_modtime\f[R]
.IP \[bu] 2
\f[V]user_agent\f[R]
.PP
An \f[V]override.var\f[R] will override all other config methods, but
\f[B]just\f[R] for the duration of the creation of the remote.
.SS global.var
.PP
This is used to set a global variable \f[B]for everything\f[R].
The global variable is set just before the remote is created.
.PP
This is useful for parameters (eg sync parameters) which can\[aq]t be
set as an \f[V]override\f[R].
For example, say you have a remote where you would always like to use
the \f[V]--checksum\f[R] flag.
You could supply the \f[V]--checksum\f[R] flag to rclone on every
command line, but instead you could put this in the config file:
.IP
.nf
\f[C]
[remote]
type = XXX
\&...
global.checksum = true
\f[R]
.fi
.PP
or use it in the connection string
\f[V]remote,global.checksum=true:\f[R] (or just
\f[V]remote,global.checksum:\f[R]).
This is equivalent to using the \f[V]--checksum\f[R] flag.
.PP
Note how the global flag name loses its initial \f[V]--\f[R] and gets
\f[V]-\f[R] replaced with \f[V]_\f[R] and gets a \f[V]global.\f[R]
prefix.
.PP
Any global variable can be set like this and it is exactly equivalent to
using the equivalent flag on the command line.
This means it will affect all uses of rclone.
.PP
If two remotes set the same global variable then the first one
instantiated will be overridden by the second one.
A \f[V]global.var\f[R] will override all other config methods when the
remote is created.
.SS Quoting and the shell
.PP
When you are typing commands to your computer you are using something
called the command line shell.
This interprets various characters in an OS specific way.
.PP
Here are some gotchas which may help users unfamiliar with the shell
rules
.SS Linux / macOS
.PP
If your names have spaces or shell metacharacters (e.g.
\f[V]*\f[R], \f[V]?\f[R], \f[V]$\f[R], \f[V]\[aq]\f[R], \f[V]\[dq]\f[R],
etc.)
then you must quote them.
Use single quotes \f[V]\[aq]\f[R] by default.
.IP
.nf
\f[C]
rclone copy \[aq]Important files?\[aq] remote:backup
\f[R]
.fi
.PP
If you want to send a \f[V]\[aq]\f[R] you will need to use
\f[V]\[dq]\f[R], e.g.
.IP
.nf
\f[C]
rclone copy \[dq]O\[aq]Reilly Reviews\[dq] remote:backup
\f[R]
.fi
.PP
The rules for quoting metacharacters are complicated and if you want the
full details you\[aq]ll have to consult the manual page for your shell.
.SS Windows
.PP
If your names have spaces in you need to put them in \f[V]\[dq]\f[R],
e.g.
.IP
.nf
\f[C]
rclone copy \[dq]E:\[rs]folder name\[rs]folder name\[rs]folder name\[dq] remote:backup
\f[R]
.fi
.PP
If you are using the root directory on its own then don\[aq]t quote it
(see #464 (https://github.com/rclone/rclone/issues/464) for why), e.g.
.IP
.nf
\f[C]
rclone copy E:\[rs] remote:backup
\f[R]
.fi
.SS Copying files or directories with \f[V]:\f[R] in the names
.PP
rclone uses \f[V]:\f[R] to mark a remote name.
This is, however, a valid filename component in non-Windows OSes.
The remote name parser will only search for a \f[V]:\f[R] up to the
first \f[V]/\f[R] so if you need to act on a file or directory like this
then use the full path starting with a \f[V]/\f[R], or use \f[V]./\f[R]
as a current directory prefix.
.PP
So to sync a directory called \f[V]sync:me\f[R] to a remote called
\f[V]remote:\f[R] use
.IP
.nf
\f[C]
rclone sync --interactive ./sync:me remote:path
\f[R]
.fi
.PP
or
.IP
.nf
\f[C]
rclone sync --interactive /full/path/to/sync:me remote:path
\f[R]
.fi
.SS Server-side copy
.PP
Most remotes (but not all - see the
overview (https://rclone.org/overview/#optional-features)) support
server-side copy.
.PP
This means if you want to copy one folder to another then rclone
won\[aq]t download all the files and re-upload them; it will instruct
the server to copy them in place.
.PP
Eg
.IP
.nf
\f[C]
rclone copy s3:oldbucket s3:newbucket
\f[R]
.fi
.PP
Will copy the contents of \f[V]oldbucket\f[R] to \f[V]newbucket\f[R]
without downloading and re-uploading.
.PP
Remotes which don\[aq]t support server-side copy \f[B]will\f[R] download
and re-upload in this case.
.PP
Server-side copies are used with \f[V]sync\f[R] and \f[V]copy\f[R] and
will be identified in the log when using the \f[V]-v\f[R] flag.
The \f[V]move\f[R] command may also use them if remote doesn\[aq]t
support server-side move directly.
This is done by issuing a server-side copy then a delete which is much
quicker than a download and re-upload.
.PP
Server-side copies will only be attempted if the remote names are the
same.
.PP
This can be used when scripting to make aged backups efficiently, e.g.
.IP
.nf
\f[C]
rclone sync --interactive remote:current-backup remote:previous-backup
rclone sync --interactive /path/to/files remote:current-backup
\f[R]
.fi
.SS Metadata support
.PP
Metadata is data about a file (or directory) which isn\[aq]t the
contents of the file (or directory).
Normally rclone only preserves the modification time and the content
(MIME) type where possible.
.PP
Rclone supports preserving all the available metadata on files and
directories when using the \f[V]--metadata\f[R] or \f[V]-M\f[R] flag.
.PP
Exactly what metadata is supported and what that support means depends
on the backend.
Backends that support metadata have a metadata section in their docs and
are listed in the features table (https://rclone.org/overview/#features)
(Eg local (https://rclone.org/local/#metadata), s3)
.PP
Some backends don\[aq]t support metadata, some only support metadata on
files and some support metadata on both files and directories.
.PP
Rclone only supports a one-time sync of metadata.
This means that metadata will be synced from the source object to the
destination object only when the source object has changed and needs to
be re-uploaded.
If the metadata subsequently changes on the source object without
changing the object itself then it won\[aq]t be synced to the
destination object.
This is in line with the way rclone syncs \f[V]Content-Type\f[R] without
the \f[V]--metadata\f[R] flag.
.PP
Using \f[V]--metadata\f[R] when syncing from local to local will
preserve file attributes such as file mode, owner, extended attributes
(not Windows).
.PP
Note that arbitrary metadata may be added to objects using the
\f[V]--metadata-set key=value\f[R] flag when the object is first
uploaded.
This flag can be repeated as many times as necessary.
.PP
The --metadata-mapper flag can be used to pass the name of a program in
which can transform metadata when it is being copied from source to
destination.
.PP
Rclone supports \f[V]--metadata-set\f[R] and \f[V]--metadata-mapper\f[R]
when doing server-side \f[V]Move\f[R] and server-side \f[V]Copy\f[R],
but not when doing server side \f[V]DirMove\f[R] (renaming a directory)
as this would involve recursing into the directory.
Note that you can disable \f[V]DirMove\f[R] with
\f[V]--disable DirMove\f[R] and rclone will revert back to using
\f[V]Move\f[R] for each individual object where \f[V]--metadata-set\f[R]
and \f[V]--metadata-mapper\f[R] are supported.
.SS Types of metadata
.PP
Metadata is divided into two type.
System metadata and User metadata.
.PP
Metadata which the backend uses itself is called system metadata.
For example on the local backend the system metadata \f[V]uid\f[R] will
store the user ID of the file when used on a unix based platform.
.PP
Arbitrary metadata is called user metadata and this can be set however
is desired.
.PP
When objects are copied from backend to backend, they will attempt to
interpret system metadata if it is supplied.
Metadata may change from being user metadata to system metadata as
objects are copied between different backends.
For example copying an object from s3 sets the \f[V]content-type\f[R]
metadata.
In a backend which understands this (like \f[V]azureblob\f[R]) this will
become the Content-Type of the object.
In a backend which doesn\[aq]t understand this (like the \f[V]local\f[R]
backend) this will become user metadata.
However should the local object be copied back to s3, the Content-Type
will be set correctly.
.SS Metadata framework
.PP
Rclone implements a metadata framework which can read metadata from an
object and write it to the object when (and only when) it is being
uploaded.
.PP
This metadata is stored as a dictionary with string keys and string
values.
.PP
There are some limits on the names of the keys (these may be clarified
further in the future).
.IP \[bu] 2
must be lower case
.IP \[bu] 2
may be \f[V]a-z\f[R] \f[V]0-9\f[R] containing \f[V].\f[R] \f[V]-\f[R] or
\f[V]_\f[R]
.IP \[bu] 2
length is backend dependent
.PP
Each backend can provide system metadata that it understands.
Some backends can also store arbitrary user metadata.
.PP
Where possible the key names are standardized, so, for example, it is
possible to copy object metadata from s3 to azureblob for example and
metadata will be translated appropriately.
.PP
Some backends have limits on the size of the metadata and rclone will
give errors on upload if they are exceeded.
.SS Metadata preservation
.PP
The goal of the implementation is to
.IP "1." 3
Preserve metadata if at all possible
.IP "2." 3
Interpret metadata if at all possible
.PP
The consequences of 1 is that you can copy an S3 object to a local disk
then back to S3 losslessly.
Likewise you can copy a local file with file attributes and xattrs from
local disk to s3 and back again losslessly.
.PP
The consequence of 2 is that you can copy an S3 object with metadata to
Azureblob (say) and have the metadata appear on the Azureblob object
also.
.SS Standard system metadata
.PP
Here is a table of standard system metadata which, if appropriate, a
backend may implement.
.PP
.TS
tab(@);
lw(34.2n) lw(21.2n) lw(14.7n).
T{
key
T}@T{
description
T}@T{
example
T}
_
T{
mode
T}@T{
File type and mode: octal, unix style
T}@T{
0100664
T}
T{
uid
T}@T{
User ID of owner: decimal number
T}@T{
500
T}
T{
gid
T}@T{
Group ID of owner: decimal number
T}@T{
500
T}
T{
rdev
T}@T{
Device ID (if special file) => hexadecimal
T}@T{
0
T}
T{
atime
T}@T{
Time of last access: RFC 3339
T}@T{
2006-01-02T15:04:05.999999999Z07:00
T}
T{
mtime
T}@T{
Time of last modification: RFC 3339
T}@T{
2006-01-02T15:04:05.999999999Z07:00
T}
T{
btime
T}@T{
Time of file creation (birth): RFC 3339
T}@T{
2006-01-02T15:04:05.999999999Z07:00
T}
T{
utime
T}@T{
Time of file upload: RFC 3339
T}@T{
2006-01-02T15:04:05.999999999Z07:00
T}
T{
cache-control
T}@T{
Cache-Control header
T}@T{
no-cache
T}
T{
content-disposition
T}@T{
Content-Disposition header
T}@T{
inline
T}
T{
content-encoding
T}@T{
Content-Encoding header
T}@T{
gzip
T}
T{
content-language
T}@T{
Content-Language header
T}@T{
en-US
T}
T{
content-type
T}@T{
Content-Type header
T}@T{
text/plain
T}
.TE
.PP
The metadata keys \f[V]mtime\f[R] and \f[V]content-type\f[R] will take
precedence if supplied in the metadata over reading the
\f[V]Content-Type\f[R] or modification time of the source object.
.PP
Hashes are not included in system metadata as there is a well defined
way of reading those already.
.SS Performance
.PP
Rclone\[aq]s defaults are fairly conservative.
They are chosen to work on small machines, slow links and with cloud
providers which rate limit heavily.
If you have plenty of bandwidth, memory and a fast storage system then
rclone can usually be made to run a great deal faster by adjusting a few
flags.
.PP
The right values depend on the size of your files, your network and the
storage systems at each end, so treat the numbers below as starting
points.
Change one thing at a time and measure the result.
.SS Measuring
.PP
Use \f[V]rclone copy\f[R] with -P/--progress to watch the transfer rate
while you are experimenting.
For unattended runs log the stats instead, e.g.
\f[V]--stats 1m --stats-one-line --stats-log-level NOTICE\f[R].
.PP
A transfer is always limited by something: the network bandwidth, the
rate at which the storage system will accept requests, disk IO, CPU or
memory.
Tuning is working out which limit you are hitting and raising it until
you hit the next one.
Watch the network, disk, CPU and memory use of the machine rclone is
running on as well as rclone\[aq]s stats.
.SS Lots of files
.PP
The time taken to transfer small files is dominated by the round trip
time of the requests rather than by the bandwidth, so the way to make
them go faster is to do more of them at once.
.PP
--transfers sets the number of files transferred in parallel.
The default is 4.
Double this until the transfer rate stops increasing or the storage
system starts returning errors.
Values of 32 to 64 are common and values in the hundreds work well with
the large object storage systems (e.g.
s3, azureblob, googlecloudstorage, b2) when transferring lots of small
files.
.PP
--checkers sets the number of directory listings and file comparisons
done in parallel.
The default is 8.
Raising this speeds up syncs where most of the files are already present
on the destination and stops the checking being the bottleneck when
\f[V]--transfers\f[R] is large.
16 to 64 is a reasonable range.
.PP
Not all storage systems like lots of parallel requests.
If you see rate limiting errors (e.g.
HTTP 429 or 503 errors) or lots of low level retries in the log then you
have gone too far, so reduce \f[V]--transfers\f[R] and
\f[V]--checkers\f[R] or use --tpslimit to cap the request rate.
Local disks, especially spinning ones, and network file systems may get
slower rather than faster with too much parallelism.
.SS Large files
.PP
A single stream often won\[aq]t fill a fast link, so rclone can transfer
a large file as several chunks in parallel.
These are called multi-thread transfers and are used for files bigger
than --multi-thread-cutoff on backends which support them.
.PP
The number of chunks transferred in parallel is set by
--multi-thread-streams (default 4) and this works for all backends so
increase this first to make large files transfer faster.
.PP
The size of the chunks is set by the backend, usually with a
\f[V]--backend-chunk-size\f[R] flag, e.g.
\f[V]--s3-chunk-size\f[R].
Backends without a natural chunk size (e.g.
local, smb) use --multi-thread-chunk-size.
Larger chunks mean fewer requests which increases throughput on big
files.
See the docs for the backend you are using for details.
.PP
Chunked uploads are usually buffered in memory, so in the worst case
rclone will use
.IP
.nf
\f[C]
--transfers * upload concurrency * chunk size
\f[R]
.fi
.PP
of memory for buffers.
For example \f[V]--transfers 256\f[R] with an upload concurrency of 8
and a chunk size of 16 MiB could use up to 32 GiB.
When you raise \f[V]--transfers\f[R] to speed up small files you may
therefore need to lower the upload concurrency, or set
--max-buffer-memory which limits the total memory used for buffers and
makes transfers wait when the limit is reached.
.PP
--use-mmap makes rclone return buffer memory to the OS as soon as it has
finished with it which is helpful when using lots of transfers or large
chunks.
.SS A mixture of large and small files
.PP
By default rclone transfers files in roughly the order it finds them.
With a mixture of file sizes this means that at times all the transfers
are large files, which fill the bandwidth but make few requests, and at
other times all the transfers are small files, which make lots of
requests but use little of the bandwidth.
.PP
Using --order-by \f[V]size,mixed,50\f[R] makes half of the transfers
take the smallest files in the backlog and half of them take the
largest.
This keeps both large and small files moving at once so the bandwidth
and the request rate are both kept full for the whole of the run.
.PP
This works best if rclone has lots of files to choose from so use it
with a big --max-backlog, e.g.
\f[V]--max-backlog 2000000\f[R].
Each item in the backlog uses in the order of 1 KiB of memory.
.SS Doing less work
.PP
Fewer requests to the storage system means a faster transfer.
.IP \[bu] 2
If the source and destination are on the same remote then rclone will
use server-side copy where it is supported so the data doesn\[aq]t need
to be downloaded and uploaded again.
.IP \[bu] 2
--fast-list lists bucket-based remotes with fewer transactions at the
cost of using more memory.
This may be faster or slower than the default so it is worth testing.
.IP \[bu] 2
--no-traverse stops rclone listing the destination which helps when
copying a small number of files into a large destination.
.IP \[bu] 2
--size-only or --checksum avoid reading the modification time.
On some object storage systems (e.g.
s3, swift) this needs an extra request for each file.
Alternatively use --use-server-modtime with \f[V]--update\f[R].
.IP \[bu] 2
--no-check-dest skips checking the destination entirely.
Only use this if you know that none of the files are there already.
.SS Options
.PP
Rclone has a number of options to control its behaviour.
These are documented below, and in the flags page.
.PP
Options that take parameters can have the values passed in two ways,
\f[V]--option=value\f[R] or \f[V]--option value\f[R].
However boolean (true/false) options behave slightly differently to the
other options in that \f[V]--boolean\f[R] sets the option to
\f[V]true\f[R] and the absence of the flag sets it to \f[V]false\f[R].
It is also possible to specify \f[V]--boolean=false\f[R] or
\f[V]--boolean=true\f[R].
Note that \f[V]--boolean false\f[R] is not valid - this is parsed as
\f[V]--boolean\f[R] and the \f[V]false\f[R] is parsed as an extra
command line argument for rclone.
.PP
String values that are recognized as special identifiers, e.g.
the name of the log level to set with option \f[V]--log-level\f[R], are
case insensitive, e.g.
\f[V]--log-level ERROR\f[R] and \f[V]--log-level error\f[R] are
identical.
.PP
Options documented to take a \f[V]stringArray\f[R] parameter accept
multiple values.
To pass more than one value, repeat the option; for example:
\f[V]--include value1 --include value2\f[R].
Other options may only accept a single value, and should only be
specified once, but where the specified parameter may indicate a list of
values separated by space or comma.
Such options are documented to take a \f[V]CommaSepList\f[R] parameter,
if comma separated, and \f[V]SpaceSepList\f[R] if space separated,
although some may also have different parameters such as
\f[V]DumpFlags\f[R] or just \f[V]string\f[R] and the help text explains
that this will be interpreted as a list.
.PP
Floating-point values with fractional part must use period (\f[V].\f[R])
as decimal separator, common in English-speaking countries, regardless
of your configured system locale.
Parameter type \f[V]float\f[R] accepts decimal and hexadecimal
floating-point numbers as defined by the Go syntax for floating-point
literals (https://go.dev/ref/spec#Floating-point_literals).
.SS Time and duration options
.PP
Options that take a \f[V]Time\f[R] or \f[V]Duration\f[R] parameter must
be specified as a formatted string describing an absolute or relative
time.
Note that both \f[V]Time\f[R] and \f[V]Duration\f[R] parameter types can
be expressed as either absolute or relative time, just with different
interpretations, e.g.
a relative time will be treated as an offset from the current time when
passed as a \f[V]Time\f[R] value.
.PP
An absolute time can be specified as a string in one of the following
formats:
.IP \[bu] 2
RFC3339 - e.g.
\f[V]2006-01-02T15:04:05Z\f[R] or \f[V]2006-01-02T15:04:05+07:00\f[R]
.IP \[bu] 2
ISO8601 Date and time, local timezone - \f[V]2006-01-02T15:04:05\f[R]
.IP \[bu] 2
ISO8601 Date and time, local timezone - \f[V]2006-01-02 15:04:05\f[R]
.IP \[bu] 2
ISO8601 Date - \f[V]2006-01-02\f[R] (YYYY-MM-DD)
.PP
A relative time is a string with a, possibly signed, sequence of decimal
numbers, each with optional fraction, and each with a unit suffix.
If the string only contains a single number, then the unit suffix is
optional and will default to seconds, i.e.
a plain decimal value will be treated as a number of seconds.
The following suffixes are valid:
.IP \[bu] 2
\f[V]ms\f[R] - Milliseconds
.IP \[bu] 2
\f[V]s\f[R] - Seconds
.IP \[bu] 2
\f[V]m\f[R] - Minutes
.IP \[bu] 2
\f[V]h\f[R] - Hours
.IP \[bu] 2
\f[V]d\f[R] - Days
.IP \[bu] 2
\f[V]w\f[R] - Weeks
.IP \[bu] 2
\f[V]M\f[R] - Months
.IP \[bu] 2
\f[V]y\f[R] - Years
.PP
Examples: \[dq]10\[dq], \[dq]300ms\[dq], \[dq]-1.5h\[dq],
\[dq]2h45m\[dq] or \[dq]1d12h\[dq].
.SS Size options
.PP
Options that take a SizeSuffix parameter can be specified as an integer
value, which will then be assumed to represent a KiB value (multiples of
1024 bytes) by default.
The interpretation can be changed by appending a suffix: \f[V]B\f[R] for
Byte, \f[V]K\f[R] for KiB, \f[V]M\f[R] for MiB, \f[V]G\f[R] for GiB,
\f[V]T\f[R] for TiB and \f[V]P\f[R] for PiB.
These are the binary units, e.g.
1, 2**10, 2**20, 2**30 respectively.
.PP
See also --human-readable.
.SS Main options
.SS --allow-https-downgrade
.PP
By default rclone refuses to follow a redirect from an
\f[V]https://\f[R] URL to a plain \f[V]http://\f[R] URL, as any
credentials or other headers in the request would then be sent
unencrypted, and the response could be altered by anyone on the network
path.
The request fails with an error which mentions this flag.
.PP
Set \f[V]--allow-https-downgrade\f[R] to follow such redirects, for
example when downloading from a mirror which redirects to plain HTTP.
Some backends still refuse to follow them, as doing so would send their
credentials in cleartext.
.PP
This option defaults to \f[V]false\f[R].
.SS --backup-dir string
.PP
When using sync (https://rclone.org/commands/rclone_sync/),
copy (https://rclone.org/commands/rclone_copy/) or
move (https://rclone.org/commands/rclone_move/), any files which would
have been overwritten or deleted are moved in their original hierarchy
into this directory.
.PP
If \f[V]--suffix\f[R] is set, then the moved files will have the suffix
added to them.
If there is a file with the same path (after the suffix has been added)
in the directory, then it will be overwritten.
.PP
The remote in use must support server-side move or copy and you must use
the same remote as the destination of the sync.
The backup directory must not overlap the destination directory without
it being excluded by a filter rule.
.PP
For example
.IP
.nf
\f[C]
rclone sync --interactive /path/to/local remote:current --backup-dir remote:old
\f[R]
.fi
.PP
will sync \f[V]/path/to/local\f[R] to \f[V]remote:current\f[R], but for
any files which would have been updated or deleted will be stored in
\f[V]remote:old\f[R].
.PP
If running rclone from a script you might want to use today\[aq]s date
as the directory name passed to \f[V]--backup-dir\f[R] to store the old
files, or you might want to pass \f[V]--suffix\f[R] with today\[aq]s
date.
This can be done with \f[V]--suffix $(date +%F)\f[R] in bash, and
\f[V]--suffix $(Get-Date -Format \[aq]yyyy-MM-dd\[aq])\f[R] in
PowerShell.
.PP
See \f[V]--compare-dest\f[R] and \f[V]--copy-dest\f[R].
.SS --bind string
.PP
Local address to bind to for outgoing connections.
This can be an IPv4 address (1.2.3.4), an IPv6 address (1234::789A) or
host name.
If the host name doesn\[aq]t resolve or resolves to more than one IP
address it will give an error.
.PP
You can use \f[V]--bind 0.0.0.0\f[R] to force rclone to use IPv4
addresses and \f[V]--bind ::0\f[R] to force rclone to use IPv6
addresses.
.SS --bwlimit BwTimetable
.PP
This option controls the bandwidth limit.
For example
.IP
.nf
\f[C]
--bwlimit 10M
\f[R]
.fi
.PP
would mean limit the upload and download bandwidth to 10 MiB/s.
\f[B]NB\f[R] this is \f[B]bytes\f[R] per second not \f[B]bits\f[R] per
second.
To use a single limit, specify the desired bandwidth in KiB/s, or use a
suffix B|K|M|G|T|P.
The default is \f[V]0\f[R] which means to not limit bandwidth.
.PP
The upload and download bandwidth can be specified separately, as
\f[V]--bwlimit UP:DOWN\f[R], so
.IP
.nf
\f[C]
--bwlimit 10M:100k
\f[R]
.fi
.PP
would mean limit the upload bandwidth to 10 MiB/s and the download
bandwidth to 100 KiB/s.
Either limit can be \[dq]off\[dq] meaning no limit, so to just limit the
upload bandwidth you would use
.IP
.nf
\f[C]
--bwlimit 10M:off
\f[R]
.fi
.PP
this would limit the upload bandwidth to 10 MiB/s but the download
bandwidth would be unlimited.
.PP
When specified as above the bandwidth limits last for the duration of
run of the rclone binary.
.PP
It is also possible to specify a \[dq]timetable\[dq] of limits, which
will cause certain limits to be applied at certain times.
To specify a timetable, format your entries as
\f[V]WEEKDAY-HH:MM,BANDWIDTH WEEKDAY-HH:MM,BANDWIDTH...\f[R] where:
\f[V]WEEKDAY\f[R] is optional element.
.IP \[bu] 2
\f[V]BANDWIDTH\f[R] can be a single number, e.g.\f[V]100k\f[R] or a pair
of numbers for upload:download, e.g.\f[V]10M:1M\f[R].
.IP \[bu] 2
\f[V]WEEKDAY\f[R] can be written as the whole word or only using the
first 3 characters.
It is optional.
.IP \[bu] 2
\f[V]HH:MM\f[R] is an hour from 00:00 to 23:59.
.PP
Entries can be separated by spaces or semicolons.
.PP
\f[B]Note:\f[R] Semicolons can be used as separators instead of spaces
to avoid parsing issues in environments like Docker.
.PP
An example of a typical timetable to avoid link saturation during
daytime working hours could be:
.PP
Using spaces as separators:
\f[V]--bwlimit \[dq]08:00,512k 12:00,10M 13:00,512k 18:00,30M 23:00,off\[dq]\f[R]
.PP
Using semicolons as separators:
\f[V]--bwlimit \[dq]08:00,512k;12:00,10M;13:00,512k;18:00,30M;23:00,off\[dq]\f[R]
.PP
In these examples, the transfer bandwidth will be set to 512 KiB/s at
8am every day.
At noon, it will rise to 10 MiB/s, and drop back to 512 KiB/sec at 1pm.
At 6pm, the bandwidth limit will be set to 30 MiB/s, and at 11pm it will
be completely disabled (full speed).
Anything between 11pm and 8am will remain unlimited.
.PP
An example of timetable with \f[V]WEEKDAY\f[R] could be:
.PP
Using spaces as separators:
\f[V]--bwlimit \[dq]Mon-00:00,512 Fri-23:59,10M Sat-10:00,1M Sun-20:00,off\[dq]\f[R]
.PP
Using semicolons as separators:
\f[V]--bwlimit \[dq]Mon-00:00,512;Fri-23:59,10M;Sat-10:00,1M;Sun-20:00,off\[dq]\f[R]
.PP
It means that, the transfer bandwidth will be set to 512 KiB/s on
Monday.
It will rise to 10 MiB/s before the end of Friday.
At 10:00 on Saturday it will be set to 1 MiB/s.
From 20:00 on Sunday it will be unlimited.
.PP
Timeslots without \f[V]WEEKDAY\f[R] are extended to the whole week.
So this example:
.IP
.nf
\f[C]
--bwlimit \[dq]Mon-00:00,512 12:00,1M Sun-20:00,off\[dq]
\f[R]
.fi
.PP
Is equivalent to this:
.IP
.nf
\f[C]
--bwlimit \[dq]Mon-00:00,512 Mon-12:00,1M Tue-12:00,1M Wed-12:00,1M Thu-12:00,1M Fri-12:00,1M Sat-12:00,1M Sun-12:00,1M Sun-20:00,off\[dq]
\f[R]
.fi
.PP
Bandwidth limit apply to the data transfer for all backends.
For most backends the directory listing bandwidth is also included
(exceptions being the non HTTP backends, \f[V]ftp\f[R], \f[V]sftp\f[R]
and \f[V]storj\f[R]).
.PP
Note that the units are \f[B]Byte/s\f[R], not \f[B]bit/s\f[R].
Typically connections are measured in bit/s - to convert divide by 8.
For example, let\[aq]s say you have a 10 Mbit/s connection and you wish
rclone to use half of it - 5 Mbit/s.
This is 5/8 = 0.625 MiB/s so you would use a \f[V]--bwlimit 0.625M\f[R]
parameter for rclone.
.PP
On Unix systems (Linux, macOS, \&...)
the bandwidth limiter can be toggled by sending a \f[V]SIGUSR2\f[R]
signal to rclone.
This allows to remove the limitations of a long running rclone transfer
and to restore it back to the value specified with \f[V]--bwlimit\f[R]
quickly when needed.
Assuming there is only one rclone instance running, you can toggle the
limiter like this:
.IP
.nf
\f[C]
kill -SIGUSR2 $(pidof rclone)
\f[R]
.fi
.PP
If you configure rclone with a remote control then you can use change
the bwlimit dynamically:
.IP
.nf
\f[C]
rclone rc core/bwlimit rate=1M
\f[R]
.fi
.SS --bwlimit-file BwTimetable
.PP
This option controls per file bandwidth limit.
For the options see the \f[V]--bwlimit\f[R] flag.
.PP
For example use this to allow no transfers to be faster than 1 MiB/s
.IP
.nf
\f[C]
--bwlimit-file 1M
\f[R]
.fi
.PP
This can be used in conjunction with \f[V]--bwlimit\f[R].
.PP
Note that if a schedule is provided the file will use the schedule in
effect at the start of the transfer.
.SS --buffer-size SizeSuffix
.PP
Use this sized buffer to speed up file transfers.
Each \f[V]--transfer\f[R] will use this much memory for buffering.
.PP
When using \f[V]mount\f[R] or \f[V]cmount\f[R] each open file descriptor
will use this much memory for buffering.
See the
mount (https://rclone.org/commands/rclone_mount/#vfs-file-buffering)
documentation for more details.
.PP
Set to \f[V]0\f[R] to disable the buffering for the minimum memory
usage.
.PP
Note that the memory allocation of the buffers is influenced by the
--use-mmap flag.
.SS --cache-dir string
.PP
Specify the directory rclone will use for caching, to override the
default.
.PP
Default value is depending on operating system:
.IP \[bu] 2
Windows \f[V]%LocalAppData%\[rs]rclone\f[R], if \f[V]LocalAppData\f[R]
is defined.
.IP \[bu] 2
macOS \f[V]$HOME/Library/Caches/rclone\f[R] if \f[V]HOME\f[R] is
defined.
.IP \[bu] 2
Unix \f[V]$XDG_CACHE_HOME/rclone\f[R] if \f[V]XDG_CACHE_HOME\f[R] is
defined, else \f[V]$HOME/.cache/rclone\f[R] if \f[V]HOME\f[R] is
defined.
.IP \[bu] 2
Fallback (on all OS) to \f[V]$TMPDIR/rclone\f[R], where \f[V]TMPDIR\f[R]
is the value from --temp-dir.
.PP
You can use the config
paths (https://rclone.org/commands/rclone_config_paths/) command to see
the current value.
.PP
Cache directory is heavily used by the VFS File
Caching (https://rclone.org/commands/rclone_mount/#vfs-file-caching)
mount feature, but also by
serve (https://rclone.org/commands/rclone_serve/), GUI and other parts
of rclone.
.SS --check-first
.PP
If this flag is set then in a
sync (https://rclone.org/commands/rclone_sync/),
copy (https://rclone.org/commands/rclone_copy/) or
move (https://rclone.org/commands/rclone_move/), rclone will do all the
checks to see whether files need to be transferred before doing any of
the transfers.
Normally rclone would start running transfers as soon as possible.
.PP
This flag can be useful on IO limited systems where transfers interfere
with checking.
.PP
It can also be useful to ensure perfect ordering when using
\f[V]--order-by\f[R].
.PP
If both \f[V]--check-first\f[R] and \f[V]--order-by\f[R] are set when
doing \f[V]rclone move\f[R] then rclone will use the transfer thread to
delete source files which don\[aq]t need transferring.
This will enable perfect ordering of the transfers and deletes but will
cause the transfer stats to have more items in than expected.
.PP
Using this flag can use more memory as it effectively sets
\f[V]--max-backlog\f[R] to infinite.
This means that all the info on the objects to transfer is held in
memory before the transfers start.
.SS --checkers int
.PP
Originally controlling just the number of file checkers to run in
parallel, e.g.
by \f[V]rclone copy\f[R].
Now a fairly universal parallelism control used by \f[V]rclone\f[R] in
several places.
.PP
Note: checkers do the equality checking of files during a sync.
For some storage systems (e.g.
S3, Swift, Dropbox) this can take a significant amount of time so they
are run in parallel.
.PP
The default is to run 8 checkers in parallel.
However, in case of slow-reacting backends you may need to lower (rather
than increase) this default by setting \f[V]--checkers\f[R] to 4 or less
threads.
This is especially advised if you are experiencing backend server
crashes during file checking phase (e.g.
on subsequent or top-up backups where little or no file copying is done
and checking takes up most of the time).
Increase this setting only with utmost care, while monitoring your
server health and file checking throughput.
.SS -c, --checksum
.PP
Normally rclone will look at modification time and size of files to see
if they are equal.
If you set this flag then rclone will check the file hash and size to
determine if files are equal.
.PP
This is useful when the remote doesn\[aq]t support setting modified time
and a more accurate sync is desired than just checking the file size.
.PP
This is very useful when transferring between remotes which store the
same hash type on the object, e.g.
Drive and Swift.
For details of which remotes support which hash type see the table in
the overview section (https://rclone.org/overview/).
.PP
Eg \f[V]rclone --checksum sync s3:/bucket swift:/bucket\f[R] would run
much quicker than without the \f[V]--checksum\f[R] flag.
.PP
When using this flag, rclone won\[aq]t update mtimes of remote files if
they are incorrect as it would normally.
.SS --color AUTO|NEVER|ALWAYS
.PP
Specify when colors (and other ANSI codes) should be added to the
output.
.PP
\f[V]AUTO\f[R] only allows ANSI codes when the output is a terminal.
This is the default.
.PP
\f[V]NEVER\f[R] never allow ANSI codes.
.PP
\f[V]ALWAYS\f[R] always add ANSI codes, regardless of the output format
(terminal or file).
.SS --compare-dest stringArray
.PP
When using sync (https://rclone.org/commands/rclone_sync/),
copy (https://rclone.org/commands/rclone_copy/) or
move (https://rclone.org/commands/rclone_move/), the specified paths are
checked in addition to the destination for files.
If a file identical to the source is found, that file is \f[B]not\f[R]
copied from source.
This is useful to copy just files that have changed since the last
backup.
.PP
You must use the same remote as the destination of the sync.
The compare directory must not overlap the destination directory.
.PP
See \f[V]--copy-dest\f[R] and \f[V]--backup-dir\f[R].
.SS --config string
.PP
Specify the location of the rclone configuration file, to override the
default.
E.g.
\f[V]rclone config --config=\[dq]rclone.conf\[dq]\f[R].
.PP
The exact default is a bit complex to describe, due to changes
introduced through different versions of rclone while preserving
backwards compatibility, but in most cases it is as simple as:
.IP \[bu] 2
\f[V]%APPDATA%/rclone/rclone.conf\f[R] on Windows
.IP \[bu] 2
\f[V]\[ti]/.config/rclone/rclone.conf\f[R] on other
.PP
The complete logic is as follows: Rclone will look for an existing
configuration file in any of the following locations, in priority order:
.IP "1." 3
\f[V]rclone.conf\f[R] (in program directory, where rclone executable is)
.IP "2." 3
\f[V]%APPDATA%/rclone/rclone.conf\f[R] (only on Windows)
.IP "3." 3
\f[V]$XDG_CONFIG_HOME/rclone/rclone.conf\f[R] (on all systems, including
Windows)
.IP "4." 3
\f[V]\[ti]/.config/rclone/rclone.conf\f[R] (see below for explanation of
\[ti] symbol)
.IP "5." 3
\f[V]\[ti]/.rclone.conf\f[R]
.PP
If no existing configuration file is found, then a new one will be
created in the following location:
.IP \[bu] 2
On Windows: Location 2 listed above, except in the unlikely event that
\f[V]APPDATA\f[R] is not defined, then location 4 is used instead.
.IP \[bu] 2
On Unix: Location 3 if \f[V]XDG_CONFIG_HOME\f[R] is defined, else
location 4.
.IP \[bu] 2
Fallback to location 5 (on all OS), when the rclone directory cannot be
created, but if also a home directory was not found then path
\f[V].rclone.conf\f[R] relative to current working directory will be
used as a final resort.
.PP
The \f[V]\[ti]\f[R] symbol in paths above represent the home directory
of the current user on any OS, and the value is defined as following:
.IP \[bu] 2
On Windows: \f[V]%HOME%\f[R] if defined, else \f[V]%USERPROFILE%\f[R],
or else \f[V]%HOMEDRIVE%\[rs]%HOMEPATH%\f[R].
.IP \[bu] 2
On Unix: \f[V]$HOME\f[R] if defined, else by looking up current user in
OS-specific user database (e.g.
passwd file), or else use the result from shell command
\f[V]cd && pwd\f[R].
.PP
If you run \f[V]rclone config file\f[R] you will see where the default
location is for you.
Running \f[V]rclone config touch\f[R] will ensure a configuration file
exists, creating an empty one in the default location if there is none.
.PP
The fact that an existing file \f[V]rclone.conf\f[R] in the same
directory as the rclone executable is always preferred, means that it is
easy to run in \[dq]portable\[dq] mode by downloading rclone executable
to a writable directory and then create an empty file
\f[V]rclone.conf\f[R] in the same directory.
.PP
If the location is set to empty string \f[V]\[dq]\[dq]\f[R] or path to a
file with name \f[V]notfound\f[R], or the os null device represented by
value \f[V]NUL\f[R] on Windows and \f[V]/dev/null\f[R] on Unix systems,
then rclone will keep the configuration file in memory only.
.PP
You may see a log message \[dq]Config file not found - using
defaults\[dq] if there is no configuration file.
This can be suppressed, e.g.
if you are using rclone entirely with on the fly
remotes (https://rclone.org/docs/#backend-path-to-dir), by using
memory-only configuration file or by creating an empty configuration
file, as described above.
.PP
The file format is basic
INI (https://en.wikipedia.org/wiki/INI_file#Format): Sections of text,
led by a \f[V][section]\f[R] header and followed by \f[V]key=value\f[R]
entries on separate lines.
In rclone each remote is represented by its own section, where the
section name defines the name of the remote.
Options are specified as the \f[V]key=value\f[R] entries, where the key
is the option name without the \f[V]--backend-\f[R] prefix, in lowercase
and with \f[V]_\f[R] instead of \f[V]-\f[R].
E.g.
option \f[V]--mega-hard-delete\f[R] corresponds to key
\f[V]hard_delete\f[R].
Only backend options can be specified.
A special, and required, key \f[V]type\f[R] identifies the storage
system (https://rclone.org/overview/), where the value is the internal
lowercase name as returned by command \f[V]rclone help backends\f[R].
Comments are indicated by \f[V];\f[R] or \f[V]#\f[R] at the beginning of
a line.
.PP
Example:
.IP
.nf
\f[C]
[megaremote]
type = mega
user = you\[at]example.com
pass = PDPcQVVjVtzFY-GTdDFozqBhTdsPg3qH
\f[R]
.fi
.PP
Note that passwords are in
obscured (https://rclone.org/commands/rclone_obscure/) form.
Also, many storage systems uses token-based authentication instead of
passwords, and this requires additional steps.
It is easier, and safer, to use the interactive command
\f[V]rclone config\f[R] instead of manually editing the configuration
file.
.PP
The configuration file will typically contain login information, and
should therefore have restricted permissions so that only the current
user can read it.
Rclone tries to ensure this when it writes the file.
You may also choose to encrypt the file.
.PP
When token-based authentication are used, the configuration file must be
writable, because rclone needs to update the tokens inside it.
.PP
To reduce risk of corrupting an existing configuration file, rclone will
not write directly to it when saving changes.
Instead it will first write to a new, temporary, file.
If a configuration file already existed, it will (on Unix systems) try
to mirror its permissions to the new file.
Then it will rename the existing file to a temporary name as backup.
Next, rclone will rename the new file to the correct name, before
finally cleaning up by deleting the backup file.
.PP
If the configuration file path used by rclone is a symbolic link, then
this will be evaluated and rclone will write to the resolved path,
instead of overwriting the symbolic link.
Temporary files used in the process (described above) will be written to
the same parent directory as that of the resolved configuration file,
but if this directory is also a symbolic link it will not be resolved
and the temporary files will be written to the location of the directory
symbolic link.
.SS --contimeout Duration
.PP
Set the connection timeout.
This should be in go time format which looks like \f[V]5s\f[R] for 5
seconds, \f[V]10m\f[R] for 10 minutes, or \f[V]3h30m\f[R].
.PP
The connection timeout is the amount of time rclone will wait for a
connection to go through to a remote object storage system.
It is \f[V]1m\f[R] by default.
.SS --copy-dest stringArray
.PP
When using sync (https://rclone.org/commands/rclone_sync/),
copy (https://rclone.org/commands/rclone_copy/) or
move (https://rclone.org/commands/rclone_move/), the specified paths are
checked in addition to the destination for files.
This part is the same as \f[V]--compare-dest\f[R], but the difference is
that with \f[V]--copy-dest\f[R], if a file identical to the source is
found, that file is server-side copied from the specified paths to the
destination.
This is useful for incremental backup.
.PP
The remote in use must support server-side copy and you must use the
same remote as the destination of the sync.
The compare directory must not overlap the destination directory.
.PP
See \f[V]--compare-dest\f[R] and \f[V]--backup-dir\f[R].
.SS --dedupe-mode interactive|skip|first|newest|oldest|largest|smallest|rename|list
.PP
Mode to run dedupe command in.
One of \f[V]interactive\f[R], \f[V]skip\f[R], \f[V]first\f[R],
\f[V]newest\f[R], \f[V]oldest\f[R], \f[V]largest\f[R],
\f[V]smallest\f[R], \f[V]rename\f[R] \f[V]list\f[R].
The default is \f[V]interactive\f[R].
See the dedupe (https://rclone.org/commands/rclone_dedupe/) command for
more information as to what these options mean.
.SS --default-time Time
.PP
If a file or directory does not have a modification time rclone can read
then rclone will display this fixed time instead.
.PP
The default is \f[V]2000-01-01 00:00:00 UTC\f[R].
This can be configured in any of the ways shown in time options.
.PP
For example \f[V]--default-time 2020-06-01\f[R] to set the default time
to the 1st of June 2020 or \f[V]--default-time 0s\f[R] to set the
default time to the time rclone started up.
.SS --disable string
.PP
This disables a comma separated list of optional features.
For example to disable server-side move and server-side copy use:
.IP
.nf
\f[C]
--disable move,copy
\f[R]
.fi
.PP
The features can be put in any case.
.PP
To see a list of which features can be disabled use:
.IP
.nf
\f[C]
--disable help
\f[R]
.fi
.PP
The features a remote has can be seen in JSON format with:
.IP
.nf
\f[C]
rclone backend features remote:
\f[R]
.fi
.PP
See the overview features (https://rclone.org/overview/#features) and
optional features (https://rclone.org/overview/#optional-features) to
get an idea of which feature does what.
.PP
Note that some features can be set to \f[V]true\f[R] if they are
\f[V]true\f[R]/\f[V]false\f[R] feature flag features by prefixing them
with \f[V]!\f[R].
For example the \f[V]CaseInsensitive\f[R] feature can be forced to
\f[V]false\f[R] with \f[V]--disable CaseInsensitive\f[R] and forced to
\f[V]true\f[R] with \f[V]--disable \[aq]!CaseInsensitive\[aq]\f[R].
In general it isn\[aq]t a good idea doing this but it may be useful in
extremis.
.PP
(Note that \f[V]!\f[R] is a shell command which you will need to escape
with single quotes or a backslash on unix like platforms.)
.PP
This flag can be useful for debugging and in exceptional circumstances
(e.g.
Google Drive limiting the total volume of server-side copies to 100
GiB/day).
.SS --disable-http2
.PP
This stops rclone from trying to use HTTP/2 if available.
This can sometimes speed up transfers due to a problem in the Go
standard library (https://github.com/golang/go/issues/37373).
.SS --dscp string
.PP
Specify a DSCP value or name to use in connections.
This could help QoS system to identify traffic class.
BE, EF, DF, LE, CSx and AFxx are allowed.
.PP
See the description of differentiated
services (https://en.wikipedia.org/wiki/Differentiated_services) to get
an idea of this field.
Setting this to 1 (LE) to identify the flow to SCAVENGER class can avoid
occupying too much bandwidth in a network with DiffServ support (RFC
8622 (https://tools.ietf.org/html/rfc8622)).
.PP
For example, if you configured QoS on router to handle LE properly.
Running:
.IP
.nf
\f[C]
rclone copy --dscp LE from:/from to:/to
\f[R]
.fi
.PP
would make the priority lower than usual internet flows.
.PP
This option has no effect on Windows (see
golang/go#42728 (https://github.com/golang/go/issues/42728)).
.SS -n, --dry-run
.PP
Do a trial run with no permanent changes.
Use this to see what rclone would do without actually doing it.
Useful when setting up the
sync (https://rclone.org/commands/rclone_sync/) command which deletes
files in the destination.
.SS --expect-continue-timeout Duration
.PP
This specifies the amount of time to wait for a server\[aq]s first
response headers after fully writing the request headers if the request
has an \[dq]Expect: 100-continue\[dq] header.
Not all backends support using this.
.PP
Zero means no timeout and causes the body to be sent immediately,
without waiting for the server to approve.
This time does not include the time to send the request header.
.PP
The default is \f[V]1s\f[R].
Set to \f[V]0\f[R] to disable.
.SS --error-on-no-transfer
.PP
By default, rclone will exit with return code 0 if there were no errors.
.PP
This option allows rclone to return exit code 9 if no files were
transferred between the source and destination.
This allows using rclone in scripts, and triggering follow-on actions if
data was copied, or skipping if not.
.PP
NB: Enabling this option turns a usually non-fatal error into a
potentially fatal one - please check and adjust your scripts
accordingly!
.SS --fix-case
.PP
Normally, a sync to a case insensitive dest (such as macOS / Windows)
will not result in a matching filename if the source and dest filenames
have casing differences but are otherwise identical.
For example, syncing \f[V]hello.txt\f[R] to \f[V]HELLO.txt\f[R] will
normally result in the dest filename remaining \f[V]HELLO.txt\f[R].
If \f[V]--fix-case\f[R] is set, then \f[V]HELLO.txt\f[R] will be renamed
to \f[V]hello.txt\f[R] to match the source.
.PP
NB:
.IP \[bu] 2
directory names with incorrect casing will also be fixed
.IP \[bu] 2
\f[V]--fix-case\f[R] will be ignored if \f[V]--immutable\f[R] is set
.IP \[bu] 2
using \f[V]--local-case-sensitive\f[R] instead is not advisable; it will
cause \f[V]HELLO.txt\f[R] to get deleted!
.IP \[bu] 2
the old dest filename must not be excluded by filters.
Be especially careful with
\f[V]--files-from\f[R] (https://rclone.org/filtering/#files-from-read-list-of-source-file-names),
which does not respect
\f[V]--ignore-case\f[R] (https://rclone.org/filtering/#ignore-case-make-searches-case-insensitive)!
.IP \[bu] 2
on remotes that do not support server-side move, \f[V]--fix-case\f[R]
will require downloading the file and re-uploading it.
To avoid this, do not use \f[V]--fix-case\f[R].
.SS --fs-cache-expire-duration Duration
.PP
When using rclone via the API rclone caches created remotes for 5
minutes by default in the \[dq]fs cache\[dq].
This means that if you do repeated actions on the same remote then
rclone won\[aq]t have to build it again from scratch, which makes it
more efficient.
.PP
This flag sets the time that the remotes are cached for.
If you set it to \f[V]0\f[R] (or negative) then rclone won\[aq]t cache
the remotes at all.
.PP
Note that if you use some flags, eg \f[V]--backup-dir\f[R] and if this
is set to \f[V]0\f[R] rclone may build two remotes (one for the source
or destination and one for the \f[V]--backup-dir\f[R] where it may have
only built one before.
.SS --fs-cache-expire-interval Duration
.PP
This controls how often rclone checks for cached remotes to expire.
See the \f[V]--fs-cache-expire-duration\f[R] documentation above for
more info.
The default is 60s, set to 0 to disable expiry.
.SS --header stringArray
.PP
Add an HTTP header for all transactions.
The flag can be repeated to add multiple headers.
.PP
If you want to add headers only for uploads use
\f[V]--header-upload\f[R] and if you want to add headers only for
downloads use \f[V]--header-download\f[R].
.PP
This flag is supported for all HTTP based backends even those not
supported by \f[V]--header-upload\f[R] and \f[V]--header-download\f[R]
so may be used as a workaround for those with care.
.PP
The headers are only sent to the host of the original request.
If the server redirects to another host (including a subdomain or a
different port), or redirects an \f[V]https\f[R] request to
\f[V]http\f[R], the headers are not sent to it, or to any further hop in
that redirect chain.
Rclone logs this at debug level (\f[V]-vv\f[R]).
.IP
.nf
\f[C]
rclone ls remote:test --header \[dq]X-Rclone: Foo\[dq] --header \[dq]X-LetMeIn: Yes\[dq]
\f[R]
.fi
.SS --header-download stringArray
.PP
Add an HTTP header for all download transactions.
The flag can be repeated to add multiple headers.
.IP
.nf
\f[C]
rclone sync --interactive s3:test/src \[ti]/dst --header-download \[dq]X-Amz-Meta-Test: Foo\[dq] --header-download \[dq]X-Amz-Meta-Test2: Bar\[dq]
\f[R]
.fi
.PP
See GitHub issue #59 (https://github.com/rclone/rclone/issues/59) for
currently supported backends.
.SS --header-upload stringArray
.PP
Add an HTTP header for all upload transactions.
The flag can be repeated to add multiple headers.
.IP
.nf
\f[C]
rclone sync --interactive \[ti]/src s3:test/dst --header-upload \[dq]Content-Disposition: attachment; filename=\[aq]cool.html\[aq]\[dq] --header-upload \[dq]X-Amz-Meta-Test: FooBar\[dq]
\f[R]
.fi
.PP
See GitHub issue #59 (https://github.com/rclone/rclone/issues/59) for
currently supported backends.
.SS --http-proxy string
.PP
Use this option to set an HTTP proxy for all HTTP based services to use.
.PP
Rclone also supports the standard HTTP proxy environment variables which
it will pick up automatically.
The is the way the HTTP proxy will normally be set but this flag can be
used to override it.
.SS --human-readable
.PP
Rclone commands output values for sizes (e.g.
number of bytes) and counts (e.g.
number of files) either as \f[I]raw\f[R] numbers, or in
\f[I]human-readable\f[R] format.
.PP
In human-readable format the values are scaled to larger units,
indicated with a suffix shown after the value, and rounded to three
decimals.
Rclone consistently uses binary units (powers of 2) for sizes and
decimal units (powers of 10) for counts.
The unit prefix for size is according to IEC standard notation, e.g.
\f[V]Ki\f[R] for kibi.
Used with byte unit, \f[V]1 KiB\f[R] means 1024 Byte.
In list type of output, only the unit prefix appended to the value (e.g.
\f[V]9.762Ki\f[R]), while in more textual output the full unit is shown
(e.g.
\f[V]9.762 KiB\f[R]).
For counts the SI standard notation is used, e.g.
prefix \f[V]k\f[R] for kilo.
Used with file counts, \f[V]1k\f[R] means 1000 files.
.PP
The various list (https://rclone.org/commands/rclone_ls/) commands
output raw numbers by default.
Option \f[V]--human-readable\f[R] will make them output values in
human-readable format instead (with the short unit prefix).
.PP
The about (https://rclone.org/commands/rclone_about/) command outputs
human-readable by default, with a command-specific option
\f[V]--full\f[R] to output the raw numbers instead.
.PP
Command size (https://rclone.org/commands/rclone_size/) outputs both
human-readable and raw numbers in the same output.
.PP
The tree (https://rclone.org/commands/rclone_tree/) command also
considers \f[V]--human-readable\f[R], but it will not use the exact same
notation as the other commands: It rounds to one decimal, and uses
single letter suffix, e.g.
\f[V]K\f[R] instead of \f[V]Ki\f[R].
The reason for this is that it relies on an external library.
.PP
The interactive command ncdu (https://rclone.org/commands/rclone_ncdu/)
shows human-readable by default, and responds to key \f[V]u\f[R] for
toggling human-readable format.
.SS --ignore-case-sync
.PP
Using this option will cause rclone to ignore the case of the files when
synchronizing so files will not be copied/synced when the existing
filenames are the same, even if the casing is different.
.SS --ignore-checksum
.PP
Normally rclone will check that the checksums of transferred files
match, and give an error \[dq]corrupted on transfer\[dq] if they
don\[aq]t.
.PP
You can use this option to skip that check.
You should only use it if you have had the \[dq]corrupted on
transfer\[dq] error message and you are sure you might want to transfer
potentially corrupted data.
.SS --ignore-existing
.PP
Using this option will make rclone unconditionally skip all files that
exist on the destination, no matter the content of these files.
.PP
While this isn\[aq]t a generally recommended option, it can be useful in
cases where your files change due to encryption.
However, it cannot correct partial transfers in case a transfer was
interrupted.
.PP
When performing a \f[V]move\f[R]/\f[V]moveto\f[R] command, this flag
will leave skipped files in the source location unchanged when a file
with the same name exists on the destination.
.SS --ignore-size
.PP
Normally rclone will look at modification time and size of files to see
if they are equal.
If you set this flag then rclone will check only the modification time.
If \f[V]--checksum\f[R] is set then it only checks the checksum.
.PP
It will also cause rclone to skip verifying the sizes are the same after
transfer.
.PP
This can be useful for transferring files to and from OneDrive which
occasionally misreports the size of image files (see
#399 (https://github.com/rclone/rclone/issues/399) for more info).
.SS -I, --ignore-times
.PP
Using this option will cause rclone to unconditionally upload all files
regardless of the state of files on the destination.
.PP
Normally rclone would skip any files that have the same modification
time and are the same size (or have the same checksum if using
\f[V]--checksum\f[R]).
.SS --immutable
.PP
Treat source and destination files as immutable and disallow
modification.
.PP
With this option set, files will be created and deleted as requested,
but existing files will never be updated.
If an existing file does not match between the source and destination,
rclone will give the error
\f[V]Source and destination exist but do not match: immutable file modified\f[R].
.PP
Note that only commands which transfer files (e.g.
sync (https://rclone.org/commands/rclone_sync/),
copy (https://rclone.org/commands/rclone_copy/) or
move (https://rclone.org/commands/rclone_move/)) are affected by this
behavior, and only modification is disallowed.
Files may still be deleted explicitly (e.g.
delete (https://rclone.org/commands/rclone_delete/),
purge (https://rclone.org/commands/rclone_purge/)) or implicitly (e.g.
sync (https://rclone.org/commands/rclone_sync/),
move (https://rclone.org/commands/rclone_move/)).
Use \f[V]copy --immutable\f[R] if it is desired to avoid deletion as
well as modification.
.PP
This can be useful as an additional layer of protection for immutable or
append-only data sets (notably backup archives), where modification
implies corruption and should not be propagated.
.SS --inplace
.PP
The \f[V]--inplace\f[R] flag changes the behaviour of rclone when
uploading files to some backends (backends with the
\f[V]PartialUploads\f[R] feature flag set) such as:
.IP \[bu] 2
local
.IP \[bu] 2
ftp
.IP \[bu] 2
sftp
.IP \[bu] 2
pcloud
.PP
Without \f[V]--inplace\f[R] (the default) rclone will first upload to a
temporary file with an extension like this, where \f[V]XXXXXX\f[R]
represents a hash of the source file\[aq]s fingerprint and
\f[V].partial\f[R] is --partial-suffix value (\f[V].partial\f[R] by
default).
.IP
.nf
\f[C]
original-file-name.XXXXXX.partial
\f[R]
.fi
.PP
(rclone will make sure the final name is no longer than 100 characters
by truncating the \f[V]original-file-name\f[R] part if necessary).
.PP
When the upload is complete, rclone will rename the \f[V].partial\f[R]
file to the correct name, overwriting any existing file at that point.
If the upload fails then the \f[V].partial\f[R] file will be deleted.
.PP
This prevents other users of the backend from seeing partially uploaded
files in their new names and prevents overwriting the old file until the
new one is completely uploaded.
.PP
If the \f[V]--inplace\f[R] flag is supplied, rclone will upload directly
to the final name without creating a \f[V].partial\f[R] file.
.PP
This means that an incomplete file will be visible in the directory
listings while the upload is in progress and any existing files will be
overwritten as soon as the upload starts.
If the transfer fails then the file will be deleted.
This can cause data loss of the existing file if the transfer fails.
.PP
Note that on the local file system if you don\[aq]t use
\f[V]--inplace\f[R] hard links (Unix only) will be broken.
And if you do use \f[V]--inplace\f[R] you won\[aq]t be able to update in
use executables.
.PP
On macOS, if rclone clones a file (see
--local-no-clone (https://rclone.org/local/#local-no-clone)) and the
destination already exists, the existing file is replaced with a new
one, even with \f[V]--inplace\f[R], so hard links to it will be broken.
Use \f[V]--local-no-clone\f[R] to keep them.
.PP
Note also that versions of rclone prior to v1.63.0 behave as if the
\f[V]--inplace\f[R] flag is always supplied.
.SS -i, --interactive
.PP
This flag can be used to tell rclone that you wish a manual confirmation
before destructive operations.
.PP
It is \f[B]recommended\f[R] that you use this flag while learning rclone
especially with \f[V]rclone sync\f[R].
.PP
For example
.IP
.nf
\f[C]
$ rclone delete --interactive /tmp/dir
rclone: delete \[dq]important-file.txt\[dq]?
y) Yes, this is OK (default)
n) No, skip this
s) Skip all delete operations with no more questions
!) Do all delete operations with no more questions
q) Exit rclone now.
y/n/s/!/q> n
\f[R]
.fi
.PP
The options mean
.IP \[bu] 2
\f[V]y\f[R]: \f[B]Yes\f[R], this operation should go ahead.
You can also press Return for this to happen.
You\[aq]ll be asked every time unless you choose \f[V]s\f[R] or
\f[V]!\f[R].
.IP \[bu] 2
\f[V]n\f[R]: \f[B]No\f[R], do not do this operation.
You\[aq]ll be asked every time unless you choose \f[V]s\f[R] or
\f[V]!\f[R].
.IP \[bu] 2
\f[V]s\f[R]: \f[B]Skip\f[R] all the following operations of this type
with no more questions.
This takes effect until rclone exits.
If there are any different kind of operations you\[aq]ll be prompted for
them.
.IP \[bu] 2
\f[V]!\f[R]: \f[B]Do all\f[R] the following operations with no more
questions.
Useful if you\[aq]ve decided that you don\[aq]t mind rclone doing that
kind of operation.
This takes effect until rclone exits .
If there are any different kind of operations you\[aq]ll be prompted for
them.
.IP \[bu] 2
\f[V]q\f[R]: \f[B]Quit\f[R] rclone now, just in case!
.SS --leave-root
.PP
During rmdirs it will not remove root directory, even if it\[aq]s empty.
.SS -l, --links
.PP
Normally rclone will ignore symlinks or junction points (which behave
like symlinks under Windows).
Ignored files won\[aq]t be copied, moved or deleted in a sync.
.PP
If you supply this flag then rclone will copy symbolic links from any
supported backend, and store them as text files, with a
\f[V].rclonelink\f[R] suffix in the destination.
.PP
The text file will contain the target of the symbolic link.
.PP
The \f[V]--links\f[R] / \f[V]-l\f[R] flag enables this feature for all
supported backends and the VFS.
There are individual flags for just enabling it for the VFS
\f[V]--vfs-links\f[R] and the local backend \f[V]--local-links\f[R] if
required.
.SS --list-cutoff int
.PP
When syncing rclone needs to sort directory entries before comparing
them.
Below this threshold (1,000,000) by default, rclone will store the
directory entries in memory.
1,000,000 entries will take approx 1GB of RAM to store.
Above this threshold rclone will store directory entries on disk and
sort them without using a lot of memory.
.PP
Doing this is slightly less efficient then sorting them in memory and
will only work well for the bucket based backends (eg s3, b2, azureblob,
swift) but these are the only backends likely to have millions of
entries in a directory.
.SS --log-file string
.PP
Log all of rclone\[aq]s output to a file.
This is not active by default.
This can be useful for tracking down problems with syncs in combination
with the \f[V]-v\f[R] flag.
See the logging section for more info.
.PP
If the file exists, then rclone will append to it.
.PP
Note that if you are using the \f[V]logrotate\f[R] program to manage
rclone\[aq]s logs, then you should use the \f[V]copytruncate\f[R] option
as rclone doesn\[aq]t have a signal to rotate logs.
.PP
Alternatively you can use the options below to manage rclone\[aq]s built
in log rotation.
.SS --log-file-max-size SizeSuffix
.PP
Maximum size of the log file before it\[aq]s rotated (eg \f[V]10M\f[R]).
This SizeSuffix is rounded to the nearest MiB or 1 MiB if lower.
.PP
If \f[V]--log-file\f[R] is not set then this option will be ignored.
.PP
If this option is not set, then the other log rotation options will be
ignored.
.PP
For example if the following flags are in use
.IP
.nf
\f[C]
rclone --log-file rclone.log --log-file-max-size 1M --log-file-max-backups 3
\f[R]
.fi
.PP
Then this will create log files which look like this
.IP
.nf
\f[C]
$ ls -l
-rw------- 1 user user 1048491 Apr 11 17:15 rclone-2025-04-11T17-15-29.998.log
-rw------- 1 user user 1048511 Apr 11 17:15 rclone-2025-04-11T17-15-30.467.log
-rw------- 1 user user 1048559 Apr 11 17:15 rclone-2025-04-11T17-15-30.543.log
-rw------- 1 user user 521602 Apr 11 17:15 rclone.log
\f[R]
.fi
.PP
The file \f[V]rclone.log\f[R] being the current one.
.SS --log-file-compress
.PP
If set, compress rotated log files using gzip.
This changes the extension of the old log files to \f[V].log.gz\f[R].
.PP
Defaults to false - don\[aq]t compress log files.
.SS --log-file-max-age Duration
.PP
Maximum duration to retain old log files (eg \f[V]7d\f[R]).
This is rounded to the dearest day, or 1 day if lower.
.PP
The default is to retain all old log files.
.SS --log-file-max-backups int
.PP
Maximum number of old log files to retain
.PP
The default is to retain all old log files.
.SS --log-format string
.PP
Comma separated list of log format options.
The accepted options are:
.IP \[bu] 2
\f[V]date\f[R] - Add a date in the format YYYY/MM/YY to the log.
.IP \[bu] 2
\f[V]time\f[R] - Add a time to the log in format HH:MM:SS.
.IP \[bu] 2
\f[V]microseconds\f[R] - Add microseconds to the time in format
HH:MM:SS.SSSSSS.
.IP \[bu] 2
\f[V]UTC\f[R] - Make the logs in UTC not localtime.
.IP \[bu] 2
\f[V]longfile\f[R] - Adds the source file and line number of the log
statement.
.IP \[bu] 2
\f[V]shortfile\f[R] - Adds the source file and line number of the log
statement.
.IP \[bu] 2
\f[V]pid\f[R] - Add the process ID to the log - useful with
\f[V]rclone mount --daemon\f[R].
.IP \[bu] 2
\f[V]nolevel\f[R] - Don\[aq]t add the level to the log.
.IP \[bu] 2
\f[V]json\f[R] - Equivalent to adding \f[V]--use-json-log\f[R]
.PP
They are added to the log line in the order above.
.PP
The default log format is \f[V]\[dq]date,time\[dq]\f[R].
.SS --log-level LogLevel
.PP
This sets the log level for rclone.
The default log level is \f[V]NOTICE\f[R].
.PP
\f[V]DEBUG\f[R] is equivalent to \f[V]-vv\f[R].
It outputs lots of debug info - useful for bug reports and really
finding out what rclone is doing.
.PP
\f[V]INFO\f[R] is equivalent to \f[V]-v\f[R].
It outputs information about each transfer and prints stats once a
minute by default.
.PP
\f[V]NOTICE\f[R] is the default log level if no logging flags are
supplied.
It outputs very little when things are working normally.
It outputs warnings and significant events.
.PP
\f[V]ERROR\f[R] is equivalent to \f[V]-q\f[R].
It only outputs error messages.
.PP
See also the logging section.
.SS --windows-event-log-level LogLevel
.PP
If this is configured (the default is \f[V]OFF\f[R]) then logs of this
level and above will be logged to the Windows event log in
\f[B]addition\f[R] to the normal logs.
These will be logged in JSON format as described below regardless of
what format the main logs are configured for.
.PP
The Windows event log only has 3 levels of severity \f[V]Info\f[R],
\f[V]Warning\f[R] and \f[V]Error\f[R].
If enabled we map rclone levels like this.
.IP \[bu] 2
\f[V]Error\f[R] ← \f[V]ERROR\f[R] (and above)
.IP \[bu] 2
\f[V]Warning\f[R] ← \f[V]WARNING\f[R] (note that this level is defined
but not currently used).
.IP \[bu] 2
\f[V]Info\f[R] ← \f[V]NOTICE\f[R], \f[V]INFO\f[R] and \f[V]DEBUG\f[R].
.PP
Rclone will declare its log source as \[dq]rclone\[dq] if it is has
enough permissions to create the registry key needed.
If not then logs will appear as \[dq]Application\[dq].
You can run \f[V]rclone version --windows-event-log-level DEBUG\f[R]
once as administrator to create the registry key in advance.
.PP
\f[B]Note\f[R] that the \f[V]--windows-event-log-level\f[R] level must
be greater (more severe) than or equal to the \f[V]--log-level\f[R].
For example to log DEBUG to a log file but ERRORs to the event log you
would use
.IP
.nf
\f[C]
--log-file rclone.log --log-level DEBUG --windows-event-log-level ERROR
\f[R]
.fi
.PP
This option is only supported Windows platforms.
.SS --use-json-log
.PP
This switches the log format to JSON.
The log messages are then streamed as individual JSON objects, with
fields: \f[V]level\f[R], \f[V]msg\f[R], \f[V]source\f[R], and
\f[V]time\f[R].
The resulting format is what is sometimes referred to as
newline-delimited
JSON (https://en.wikipedia.org/wiki/JSON_streaming#Newline-delimited_JSON)
(NDJSON), or JSON Lines (JSONL).
This is well suited for processing by traditional line-oriented tools
and shell pipelines, but a complete log file is not strictly valid JSON
and needs a parser that can handle it.
.PP
The JSON logs will be printed on a single line, but are shown expanded
here for clarity.
.IP
.nf
\f[C]
{
\[dq]time\[dq]: \[dq]2025-05-13T17:30:51.036237518+01:00\[dq],
\[dq]level\[dq]: \[dq]debug\[dq],
\[dq]msg\[dq]: \[dq]4 go routines active\[rs]n\[dq],
\[dq]source\[dq]: \[dq]cmd/cmd.go:298\[dq]
}
\f[R]
.fi
.PP
Completed data transfer logs will have extra \f[V]size\f[R] information.
Logs which are about a particular object will have \f[V]object\f[R] and
\f[V]objectType\f[R] fields also.
.IP
.nf
\f[C]
{
\[dq]time\[dq]: \[dq]2025-05-13T17:38:05.540846352+01:00\[dq],
\[dq]level\[dq]: \[dq]info\[dq],
\[dq]msg\[dq]: \[dq]Copied (new) to: file2.txt\[dq],
\[dq]size\[dq]: 6,
\[dq]object\[dq]: \[dq]file.txt\[dq],
\[dq]objectType\[dq]: \[dq]*local.Object\[dq],
\[dq]source\[dq]: \[dq]operations/copy.go:368\[dq]
}
\f[R]
.fi
.PP
Stats logs will contain a \f[V]stats\f[R] field which is the same as
returned from the rc call
core/stats (https://rclone.org/rc/#core-stats).
.IP
.nf
\f[C]
{
\[dq]time\[dq]: \[dq]2025-05-13T17:38:05.540912847+01:00\[dq],
\[dq]level\[dq]: \[dq]info\[dq],
\[dq]msg\[dq]: \[dq]...text version of the stats...\[dq],
\[dq]stats\[dq]: {
\[dq]bytes\[dq]: 6,
\[dq]checks\[dq]: 0,
\[dq]deletedDirs\[dq]: 0,
\[dq]deletes\[dq]: 0,
\[dq]elapsedTime\[dq]: 0.000904825,
...truncated for clarity...
\[dq]totalBytes\[dq]: 6,
\[dq]totalChecks\[dq]: 0,
\[dq]totalTransfers\[dq]: 1,
\[dq]transferTime\[dq]: 0.000882794,
\[dq]transfers\[dq]: 1
},
\[dq]source\[dq]: \[dq]accounting/stats.go:569\[dq]
}
\f[R]
.fi
.SS --low-level-retries int
.PP
This controls the number of low level retries rclone does.
.PP
A low level retry is used to retry a failing operation - typically one
HTTP request.
This might be uploading a chunk of a big file for example.
You will see low level retries in the log with the \f[V]-v\f[R] flag.
.PP
This shouldn\[aq]t need to be changed from the default in normal
operations.
However, if you get a lot of low level retries you may wish to reduce
the value so rclone moves on to a high level retry (see the
\f[V]--retries\f[R] flag) quicker.
.PP
Disable low level retries with \f[V]--low-level-retries 1\f[R].
.SS --max-backlog int
.PP
This is the maximum allowable backlog of files in a sync/copy/move
queued for being checked or transferred.
.PP
This can be set arbitrarily large.
It will only use memory when the queue is in use.
Note that it will use in the order of N KiB of memory when the backlog
is in use.
.PP
Setting this large allows rclone to calculate how many files are pending
more accurately, give a more accurate estimated finish time and make
\f[V]--order-by\f[R] work more accurately.
.PP
Setting this small will make rclone more synchronous to the listings of
the remote which may be desirable.
.PP
Setting this to a negative number will make the backlog as large as
possible.
.SS --max-buffer-memory SizeSuffix
.PP
If set, don\[aq]t allocate more than given amount of memory as buffers.
If not set or set to \f[V]0\f[R] or \f[V]off\f[R] this will not limit
the amount of memory in use.
.PP
This includes memory used by buffers created by the \f[V]--buffer\f[R]
flag and buffers used by multi-thread transfers.
.PP
Most multi-thread transfers do not take additional memory, but some do
depending on the backend (eg the s3 backend for uploads).
This means there is a tension between total setting
\f[V]--transfers\f[R] as high as possible and memory use.
.PP
Setting \f[V]--max-buffer-memory\f[R] allows the buffer memory to be
controlled so that it doesn\[aq]t overwhelm the machine and allows
\f[V]--transfers\f[R] to be set large.
.SS --max-connections int
.PP
This sets the maximum number of concurrent calls to the backend API.
It may not map 1:1 to TCP or HTTP connections depending on the backend
in use and the use of HTTP1 vs HTTP2.
.PP
When downloading files, backends only limit the initial opening of the
stream.
The bulk data download is not counted as a connection.
This means that the \f[V]--max--connections\f[R] flag won\[aq]t limit
the total number of downloads.
.PP
Note that it is possible to cause deadlocks with this setting so it
should be used with care.
.PP
If you are doing a sync or copy then make sure
\f[V]--max-connections\f[R] is one more than the sum of
\f[V]--transfers\f[R] and \f[V]--checkers\f[R].
.PP
If you use \f[V]--check-first\f[R] then \f[V]--max-connections\f[R] just
needs to be one more than the maximum of \f[V]--checkers\f[R] and
\f[V]--transfers\f[R].
.PP
So for \f[V]--max-connections 3\f[R] you\[aq]d use
\f[V]--checkers 2 --transfers 2 --check-first\f[R] or
\f[V]--checkers 1 --transfers 1\f[R].
.PP
Setting this flag can be useful for backends which do multipart uploads
to limit the number of simultaneous parts being transferred.
.SS --max-delete int
.PP
This tells rclone not to delete more than N files.
If that limit is exceeded then a fatal error will be generated and
rclone will stop the operation in progress.
.SS --max-delete-size SizeSuffix
.PP
Rclone will stop deleting files when the total size of deletions has
reached the size specified.
It defaults to off.
.PP
If that limit is exceeded then a fatal error will be generated and
rclone will stop the operation in progress.
.SS --max-depth int
.PP
This modifies the recursion depth for all the commands except purge.
.PP
So if you do \f[V]rclone --max-depth 1 ls remote:path\f[R] you will see
only the files in the top level directory.
Using \f[V]--max-depth 2\f[R] means you will see all the files in first
two directory levels and so on.
.PP
For historical reasons the \f[V]lsd\f[R] command defaults to using a
\f[V]--max-depth\f[R] of 1 - you can override this with the command line
flag.
.PP
You can use this command to disable recursion (with
\f[V]--max-depth 1\f[R]).
.PP
Note that if you use this with \f[V]sync\f[R] and
\f[V]--delete-excluded\f[R] the files not recursed through are
considered excluded and will be deleted on the destination.
Test first with \f[V]--dry-run\f[R] if you are not sure what will
happen.
.SS --max-duration Duration
.PP
Rclone will stop transferring when it has run for the duration
specified.
Defaults to off.
.PP
When the limit is reached all transfers will stop immediately.
Use \f[V]--cutoff-mode\f[R] to modify this behaviour.
.PP
Rclone will exit with exit code 10 if the duration limit is reached.
.SS --max-transfer SizeSuffix
.PP
Rclone will stop transferring when it has reached the size specified.
Defaults to off.
.PP
When the limit is reached all transfers will stop immediately.
Use \f[V]--cutoff-mode\f[R] to modify this behaviour.
.PP
Rclone will exit with exit code 8 if the transfer limit is reached.
.SS --cutoff-mode HARD|SOFT|CAUTIOUS
.PP
Configure the behavior of \f[V]--max-transfer\f[R] and
\f[V]--max-duration\f[R].
.PP
\f[V]HARD\f[R] will stop transferring immediately when rclone reaches
the limit.
This is the default.
.PP
\f[V]SOFT\f[R] will stop starting new transfers when rclone reaches the
limit.
.PP
\f[V]CAUTIOUS\f[R] will try to prevent rclone from reaching the limit.
Only applicable for \f[V]--max-transfer\f[R].
.SS -M, --metadata
.PP
Setting this flag enables rclone to copy the metadata from the source to
the destination.
For local backends this is ownership, permissions, xattr etc.
See the metadata section for more info.
.SS --metadata-mapper SpaceSepList
.PP
If you supply the parameter \f[V]--metadata-mapper /path/to/program\f[R]
then rclone will use that program to map metadata from source object to
destination object.
.PP
The argument to this flag should be a command with an optional space
separated list of arguments.
If one of the arguments has a space in then enclose it in
\f[V]\[dq]\f[R], if you want a literal \f[V]\[dq]\f[R] in an argument
then enclose the argument in \f[V]\[dq]\f[R] and double the
\f[V]\[dq]\f[R].
See CSV encoding (https://godoc.org/encoding/csv) for more info.
.IP
.nf
\f[C]
--metadata-mapper \[dq]python bin/test_metadata_mapper.py\[dq]
--metadata-mapper \[aq]python bin/test_metadata_mapper.py \[dq]argument with a space\[dq]\[aq]
--metadata-mapper \[aq]python bin/test_metadata_mapper.py \[dq]argument with \[dq]\[dq]two\[dq]\[dq] quotes\[dq]\[aq]
\f[R]
.fi
.PP
This uses a simple JSON based protocol with input on STDIN and output on
STDOUT.
This will be called for every file and directory copied and may be
called concurrently.
.PP
The program\[aq]s job is to take a metadata blob on the input and turn
it into a metadata blob on the output suitable for the destination
backend.
.PP
Input to the program (via STDIN) might look like this.
This provides some context for the \f[V]Metadata\f[R] which may be
important.
.IP \[bu] 2
\f[V]SrcFs\f[R] is the config string for the remote that the object is
currently on.
.IP \[bu] 2
\f[V]SrcFsType\f[R] is the name of the source backend.
.IP \[bu] 2
\f[V]DstFs\f[R] is the config string for the remote that the object is
being copied to
.IP \[bu] 2
\f[V]DstFsType\f[R] is the name of the destination backend.
.IP \[bu] 2
\f[V]Remote\f[R] is the path of the object relative to the root.
.IP \[bu] 2
\f[V]Size\f[R], \f[V]MimeType\f[R], \f[V]ModTime\f[R] are attributes of
the object.
.IP \[bu] 2
\f[V]IsDir\f[R] is \f[V]true\f[R] if this is a directory (not yet
implemented).
.IP \[bu] 2
\f[V]ID\f[R] is the source \f[V]ID\f[R] of the object if known.
.IP \[bu] 2
\f[V]Metadata\f[R] is the backend specific metadata as described in the
backend docs.
.IP
.nf
\f[C]
{
\[dq]SrcFs\[dq]: \[dq]gdrive:\[dq],
\[dq]SrcFsType\[dq]: \[dq]drive\[dq],
\[dq]DstFs\[dq]: \[dq]newdrive:user\[dq],
\[dq]DstFsType\[dq]: \[dq]onedrive\[dq],
\[dq]Remote\[dq]: \[dq]test.txt\[dq],
\[dq]Size\[dq]: 6,
\[dq]MimeType\[dq]: \[dq]text/plain; charset=utf-8\[dq],
\[dq]ModTime\[dq]: \[dq]2022-10-11T17:53:10.286745272+01:00\[dq],
\[dq]IsDir\[dq]: false,
\[dq]ID\[dq]: \[dq]xyz\[dq],
\[dq]Metadata\[dq]: {
\[dq]btime\[dq]: \[dq]2022-10-11T16:53:11Z\[dq],
\[dq]content-type\[dq]: \[dq]text/plain; charset=utf-8\[dq],
\[dq]mtime\[dq]: \[dq]2022-10-11T17:53:10.286745272+01:00\[dq],
\[dq]owner\[dq]: \[dq]user1\[at]domain1.com\[dq],
\[dq]permissions\[dq]: \[dq]...\[dq],
\[dq]description\[dq]: \[dq]my nice file\[dq],
\[dq]starred\[dq]: \[dq]false\[dq]
}
}
\f[R]
.fi
.PP
The program should then modify the input as desired and send it to
STDOUT.
The returned \f[V]Metadata\f[R] field will be used in its entirety for
the destination object.
Any other fields will be ignored.
Note in this example we translate user names and permissions and add
something to the description:
.IP
.nf
\f[C]
{
\[dq]Metadata\[dq]: {
\[dq]btime\[dq]: \[dq]2022-10-11T16:53:11Z\[dq],
\[dq]content-type\[dq]: \[dq]text/plain; charset=utf-8\[dq],
\[dq]mtime\[dq]: \[dq]2022-10-11T17:53:10.286745272+01:00\[dq],
\[dq]owner\[dq]: \[dq]user1\[at]domain2.com\[dq],
\[dq]permissions\[dq]: \[dq]...\[dq],
\[dq]description\[dq]: \[dq]my nice file [migrated from domain1]\[dq],
\[dq]starred\[dq]: \[dq]false\[dq]
}
}
\f[R]
.fi
.PP
Metadata can be removed here too.
.PP
An example python program might look something like this to implement
the above transformations.
.IP
.nf
\f[C]
import sys, json
i = json.load(sys.stdin)
metadata = i[\[dq]Metadata\[dq]]
# Add tag to description
if \[dq]description\[dq] in metadata:
metadata[\[dq]description\[dq]] += \[dq] [migrated from domain1]\[dq]
else:
metadata[\[dq]description\[dq]] = \[dq][migrated from domain1]\[dq]
# Modify owner
if \[dq]owner\[dq] in metadata:
metadata[\[dq]owner\[dq]] = metadata[\[dq]owner\[dq]].replace(\[dq]domain1.com\[dq], \[dq]domain2.com\[dq])
o = { \[dq]Metadata\[dq]: metadata }
json.dump(o, sys.stdout, indent=\[dq]\[rs]t\[dq])
\f[R]
.fi
.PP
You can find this example (slightly expanded) in the rclone source code
at
bin/test_metadata_mapper.py (https://github.com/rclone/rclone/blob/master/bin/test_metadata_mapper.py).
.PP
If you want to see the input to the metadata mapper and the output
returned from it in the log you can use \f[V]-vv --dump mapper\f[R].
.PP
See the metadata section for more info.
.SS --metadata-set stringArray
.PP
Specify value as string in format \f[V]key=value\f[R] to add metadata
\f[V]key\f[R] with value \f[V]value\f[R] when uploading.
This can be repeated as many times as required.
See the metadata section for more info.
.SS --modify-window Duration
.PP
When checking whether a file has been modified, this is the maximum
allowed time difference that a file can have and still be considered
equivalent.
.PP
The default is \f[V]1ns\f[R] unless this is overridden by a remote.
For example OS X only stores modification times to the nearest second so
if you are reading and writing to an OS X filing system this will be
\f[V]1s\f[R] by default.
.PP
This command line flag allows you to override that computed default.
.SS --multi-thread-write-buffer-size SizeSuffix
.PP
When transferring with multiple threads, rclone will buffer the
specified number of bytes in memory before writing to disk for each
thread.
.PP
This can improve performance if the underlying filesystem does not deal
well with a lot of small writes in different positions of the file, so
if you see transfers being limited by disk write speed, you might want
to experiment with different values.
Specially for magnetic drives and remote file systems a higher value can
be useful.
.PP
Nevertheless, the default of \f[V]128k\f[R] should be fine for almost
all use cases, so before changing it ensure that network is not really
your bottleneck.
.PP
As a final hint, size is not the only factor: block size (or similar
concept) can have an impact.
In one case, we observed that exact multiples of 16k performed much
better than other values.
.SS --multi-thread-chunk-size SizeSuffix
.PP
Normally the chunk size for multi thread transfers is set by the
backend.
However some backends such as \f[V]local\f[R] and \f[V]smb\f[R] (which
implement \f[V]OpenWriterAt\f[R] but not \f[V]OpenChunkWriter\f[R])
don\[aq]t have a natural chunk size.
.PP
In this case the value of this option is used (default 64Mi).
.SS --multi-thread-cutoff SizeSuffix
.PP
When transferring files above specified size to capable backends, rclone
will use multiple threads to transfer the file (default 256M).
.PP
Capable backends are marked in the
overview (https://rclone.org/overview/#optional-features) as
\f[V]MultithreadUpload\f[R].
(They need to implement either the \f[V]OpenWriterAt\f[R] or
\f[V]OpenChunkWriter\f[R] internal interfaces).
These include \f[V]local\f[R], \f[V]s3\f[R], \f[V]azureblob\f[R],
\f[V]b2\f[R], \f[V]oracleobjectstorage\f[R] and \f[V]smb\f[R] at the
time of writing.
.PP
On the local disk, rclone preallocates the file (using
\f[V]fallocate(FALLOC_FL_KEEP_SIZE)\f[R] on unix or
\f[V]NTSetInformationFile\f[R] on Windows both of which takes no time)
then each thread writes directly into the file at the correct place.
This means that rclone won\[aq]t create fragmented or sparse files and
there won\[aq]t be any assembly time at the end of the transfer.
.PP
The number of threads used to transfer is controlled by
\f[V]--multi-thread-streams\f[R].
.PP
Use \f[V]-vv\f[R] if you wish to see info about the threads.
.PP
This will work with the sync (https://rclone.org/commands/rclone_sync/),
copy (https://rclone.org/commands/rclone_copy/) and
move (https://rclone.org/commands/rclone_move/) commands, and friends
copyto (https://rclone.org/commands/rclone_copyto/),
moveto (https://rclone.org/commands/rclone_moveto/).
Multi thread transfers will be used with \f[V]rclone mount\f[R] and
\f[V]rclone serve\f[R] if \f[V]--vfs-cache-mode\f[R] is set to
\f[V]writes\f[R] or above.
.PP
Most multi-thread transfers do not take additional memory, but some do
(for example uploading to s3).
In the worst case memory usage can be at maximum \f[V]--transfers\f[R] *
\f[V]--multi-thread-chunk-size\f[R] * \f[V]--multi-thread-streams\f[R]
or specifically for the s3 backend \f[V]--transfers\f[R] *
\f[V]--s3-chunk-size\f[R] * \f[V]--s3-concurrency\f[R].
However you can use the
--max-buffer-memory (https://rclone.org/docs/#max-buffer-memory) flag to
control the maximum memory used here.
.PP
\f[B]NB\f[R] that this \f[B]only\f[R] works with supported backends as
the destination but will work with any backend as the source.
.PP
\f[B]NB\f[R] that multi-thread copies are disabled for local to local
copies as they are faster without unless
\f[V]--multi-thread-streams\f[R] is set explicitly.
.PP
\f[B]NB\f[R] on Windows using multi-thread transfers to the local disk
will cause the resulting files to be
sparse (https://en.wikipedia.org/wiki/Sparse_file).
Use \f[V]--local-no-sparse\f[R] to disable sparse files (which may cause
long delays at the start of transfers) or disable multi-thread transfers
with \f[V]--multi-thread-streams 0\f[R]
.SS --multi-thread-streams int
.PP
When using multi thread transfers (see above
\f[V]--multi-thread-cutoff\f[R]) this sets the number of streams to use.
Set to \f[V]0\f[R] to disable multi thread transfers (Default 4).
.PP
If the backend has a \f[V]--backend-upload-concurrency\f[R] setting (eg
\f[V]--s3-upload-concurrency\f[R]) then this setting will be used as the
number of transfers instead if it is larger than the value of
\f[V]--multi-thread-streams\f[R] or \f[V]--multi-thread-streams\f[R]
isn\[aq]t set.
.SS --name-transform stringArray
.PP
\f[V]--name-transform\f[R] introduces path name transformations for
\f[V]rclone copy\f[R], \f[V]rclone sync\f[R], and \f[V]rclone move\f[R].
These transformations enable modifications to source and destination
file names by applying prefixes, suffixes, and other alterations during
transfer operations.
For detailed docs and examples, see
\f[V]convmv\f[R] (https://rclone.org/commands/rclone_convmv/).
.SS --no-check-dest
.PP
The \f[V]--no-check-dest\f[R] can be used with \f[V]move\f[R] or
\f[V]copy\f[R] and it causes rclone not to check the destination at all
when copying files.
.PP
This means that:
.IP \[bu] 2
the destination is not listed minimising the API calls
.IP \[bu] 2
files are always transferred
.IP \[bu] 2
this can cause duplicates on remotes which allow it (e.g.
Google Drive)
.IP \[bu] 2
\f[V]--retries 1\f[R] is recommended otherwise you\[aq]ll transfer
everything again on a retry
.PP
This flag is useful to minimise the transactions if you know that none
of the files are on the destination.
.PP
This is a specialized flag which should be ignored by most users!
.SS --no-gzip-encoding
.PP
Don\[aq]t set \f[V]Accept-Encoding: gzip\f[R].
This means that rclone won\[aq]t ask the server for compressed files
automatically.
Useful if you\[aq]ve set the server to return files with
\f[V]Content-Encoding: gzip\f[R] but you uploaded compressed files.
.PP
There is no need to set this in normal operation, and doing so will
decrease the network transfer efficiency of rclone.
.SS --no-traverse
.PP
The \f[V]--no-traverse\f[R] flag controls whether the destination file
system is traversed when using the \f[V]copy\f[R] or \f[V]move\f[R]
commands.
\f[V]--no-traverse\f[R] is not compatible with \f[V]sync\f[R] and will
be ignored if you supply it with \f[V]sync\f[R].
.PP
If you are only copying a small number of files (or are filtering most
of the files) and/or have a large number of files on the destination
then \f[V]--no-traverse\f[R] will stop rclone listing the destination
and save time.
.PP
However, if you are copying a large number of files, especially if you
are doing a copy where lots of the files under consideration haven\[aq]t
changed and won\[aq]t need copying then you shouldn\[aq]t use
\f[V]--no-traverse\f[R].
.PP
See rclone copy (https://rclone.org/commands/rclone_copy/) for an
example of how to use it.
.SS --no-unicode-normalization
.PP
Don\[aq]t normalize unicode characters in filenames during the sync
routine.
.PP
Sometimes, an operating system will store filenames containing unicode
parts in their decomposed form (particularly macOS).
Some cloud storage systems will then recompose the unicode, resulting in
duplicate files if the data is ever copied back to a local filesystem.
.PP
Using this flag will disable that functionality, treating each unicode
character as unique.
For example, by default é and é will be normalized into the same
character.
With \f[V]--no-unicode-normalization\f[R] they will be treated as unique
characters.
.SS --no-update-modtime
.PP
When using this flag, rclone won\[aq]t update modification times of
remote files if they are incorrect as it would normally.
.PP
This can be used if the remote is being synced with another tool also
(e.g.
the Google Drive client).
.SS --no-update-dir-modtime
.PP
When using this flag, rclone won\[aq]t update modification times of
remote directories if they are incorrect as it would normally.
.SS --order-by string
.PP
The \f[V]--order-by\f[R] flag controls the order in which files in the
backlog are processed in \f[V]rclone sync\f[R], \f[V]rclone copy\f[R]
and \f[V]rclone move\f[R].
.PP
The order by string is constructed like this.
The first part describes what aspect is being measured:
.IP \[bu] 2
\f[V]size\f[R] - order by the size of the files
.IP \[bu] 2
\f[V]name\f[R] - order by the full path of the files
.IP \[bu] 2
\f[V]modtime\f[R] - order by the modification date of the files
.IP \[bu] 2
\f[V]pattern\f[R] - order by a list of path glob patterns
.PP
The \f[V]size\f[R], \f[V]name\f[R] and \f[V]modtime\f[R] comparisons can
have a modifier appended with a comma:
.IP \[bu] 2
\f[V]ascending\f[R] or \f[V]asc\f[R] - order so that the smallest (or
oldest) is processed first
.IP \[bu] 2
\f[V]descending\f[R] or \f[V]desc\f[R] - order so that the largest (or
newest) is processed first
.IP \[bu] 2
\f[V]mixed\f[R] - order so that the smallest is processed first for some
threads and the largest for others
.PP
If the modifier is \f[V]mixed\f[R] then it can have an optional
percentage (which defaults to \f[V]50\f[R]), e.g.
\f[V]size,mixed,25\f[R] which means that 25% of the threads should be
taking the smallest items and 75% the largest.
The threads which take the smallest first will always take the smallest
first and likewise the largest first threads.
The \f[V]mixed\f[R] mode can be useful to minimise the transfer time
when you are transferring a mixture of large and small files - the large
files are guaranteed upload threads and bandwidth and the small files
will be processed continuously.
.PP
If no modifier is supplied then the order is \f[V]ascending\f[R].
.PP
For \f[V]pattern\f[R], append one or more comma-separated patterns.
Patterns use the filter pattern
syntax (https://rclone.org/filtering/#patterns).
Files matching the first pattern are processed first, followed by files
matching the second pattern, and so on.
Files which do not match a pattern are processed last.
Within each group, files are ordered by full path.
Patterns cannot contain a comma.
.PP
For example
.IP \[bu] 2
\f[V]--order-by size,desc\f[R] - send the largest files first
.IP \[bu] 2
\f[V]--order-by modtime,ascending\f[R] - send the oldest files first
.IP \[bu] 2
\f[V]--order-by name\f[R] - send the files with alphabetically by path
first
.IP \[bu] 2
\f[V]--order-by \[aq]pattern,*.tar.gz,*.md5\[aq]\f[R] - send archives
before checksum files
.PP
If the \f[V]--order-by\f[R] flag is not supplied or it is supplied with
an empty string then the default ordering will be used which is as
scanned.
With \f[V]--checkers 1\f[R] this is mostly alphabetical, however with
the default \f[V]--checkers 8\f[R] it is somewhat random.
.SS Limitations
.PP
The \f[V]--order-by\f[R] flag does not do a separate pass over the data.
This means that it may transfer some files out of the order specified if
.IP \[bu] 2
there are no files in the backlog or the source has not been fully
scanned yet
.IP \[bu] 2
there are more than --max-backlog files in the backlog
.PP
Rclone will do its best to transfer the best file it has so in practice
this should not cause a problem.
Think of \f[V]--order-by\f[R] as being more of a best efforts flag
rather than a perfect ordering.
.PP
If you want perfect ordering then you will need to specify --check-first
which will find all the files which need transferring first before
transferring any.
.SS --partial-suffix string
.PP
When --inplace is not used, it causes rclone to use the
\f[V]--partial-suffix\f[R] as suffix for temporary files.
.PP
Suffix length limit is 16 characters.
.PP
The default is \f[V].partial\f[R].
.SS --password-command SpaceSepList
.PP
This flag supplies a program which should supply the config password
when run.
This is an alternative to rclone prompting for the password or setting
the \f[V]RCLONE_CONFIG_PASS\f[R] variable.
It is also used when setting the config password for the first time.
.PP
The argument to this should be a command with a space separated list of
arguments.
If one of the arguments has a space in then enclose it in
\f[V]\[dq]\f[R], if you want a literal \f[V]\[dq]\f[R] in an argument
then enclose the argument in \f[V]\[dq]\f[R] and double the
\f[V]\[dq]\f[R].
This includes the command itself: if the path to the executable contains
a space, it must be quoted too.
See CSV encoding (https://godoc.org/encoding/csv) for more info.
.PP
Eg
.IP
.nf
\f[C]
--password-command \[dq]echo hello\[dq]
--password-command \[aq]echo \[dq]hello with space\[dq]\[aq]
--password-command \[aq]echo \[dq]hello with \[dq]\[dq]quotes\[dq]\[dq] and space\[dq]\[aq]
--password-command \[aq]\[dq]/path with a space/get-password.sh\[dq]\[aq]
\f[R]
.fi
.PP
Note that when changing the configuration password the environment
variable \f[V]RCLONE_PASSWORD_CHANGE=1\f[R] will be set.
This can be used to distinguish initial decryption of the config file
from the new password.
.PP
See the Configuration Encryption for more info.
.PP
See a Windows PowerShell example on the
Wiki (https://github.com/rclone/rclone/wiki/Windows-Powershell-use-rclone-password-command-for-Config-file-password).
.SS -P, --progress
.PP
This flag makes rclone update the stats in a static block in the
terminal providing a realtime overview of the transfer.
.PP
Any log messages will scroll above the static block.
Log messages will push the static block down to the bottom of the
terminal where it will stay.
.PP
Normally this is updated every 500mS but this period can be overridden
with the \f[V]--stats\f[R] flag.
.PP
This can be used with the \f[V]--stats-one-line\f[R] flag for a simpler
display.
.PP
To change the display length of filenames (for different terminal
widths), see the \f[V]--stats-file-name-length\f[R] option.
The default output is formatted for 80 character wide terminals.
.PP
Note: On Windows until this
bug (https://github.com/Azure/go-ansiterm/issues/26) is fixed all
non-ASCII characters will be replaced with \f[V].\f[R] when
\f[V]--progress\f[R] is in use.
.SS --progress-terminal-title
.PP
This flag, when used with \f[V]-P/--progress\f[R], will print the string
\f[V]ETA: %s\f[R] to the terminal title.
.SS -q, --quiet
.PP
This flag will limit rclone\[aq]s output to error messages only.
.SS --refresh-times
.PP
The \f[V]--refresh-times\f[R] flag can be used to update modification
times of existing files when they are out of sync on backends which
don\[aq]t support hashes.
.PP
This is useful if you uploaded files with the incorrect timestamps and
you now wish to correct them.
.PP
This flag is \f[B]only\f[R] useful for destinations which don\[aq]t
support hashes (e.g.
\f[V]crypt\f[R]).
.PP
This can be used any of the sync commands
sync (https://rclone.org/commands/rclone_sync/),
copy (https://rclone.org/commands/rclone_copy/) or
move (https://rclone.org/commands/rclone_move/).
.PP
To use this flag you will need to be doing a modification time sync (so
not using \f[V]--size-only\f[R] or \f[V]--checksum\f[R]).
The flag will have no effect when using \f[V]--size-only\f[R] or
\f[V]--checksum\f[R].
.PP
If this flag is used when rclone comes to upload a file it will check to
see if there is an existing file on the destination.
If this file matches the source with size (and checksum if available)
but has a differing timestamp then instead of re-uploading it, rclone
will update the timestamp on the destination file.
If the checksum does not match rclone will upload the new file.
If the checksum is absent (e.g.
on a \f[V]crypt\f[R] backend) then rclone will update the timestamp.
.PP
Note that some remotes can\[aq]t set the modification time without
re-uploading the file so this flag is less useful on them.
.PP
Normally if you are doing a modification time sync rclone will update
modification times without \f[V]--refresh-times\f[R] provided that the
remote supports checksums \f[B]and\f[R] the checksums match on the file.
However if the checksums are absent then rclone will upload the file
rather than setting the timestamp as this is the safe behaviour.
.SS --retries int
.PP
Retry the entire sync if it fails this many times it fails (default 3).
.PP
Some remotes can be unreliable and a few retries help pick up the files
which didn\[aq]t get transferred because of errors.
.PP
Disable retries with \f[V]--retries 1\f[R].
.SS --retries-sleep Duration
.PP
This sets the interval between each retry specified by
\f[V]--retries\f[R]
.PP
The default is \f[V]0\f[R].
Use \f[V]0\f[R] to disable.
.SS --server-side-across-configs
.PP
Allow server-side operations (e.g.
copy or move) to work across different configurations.
.PP
This can be useful if you wish to do a server-side copy or move between
two remotes which use the same backend but are configured differently.
.PP
Note that this isn\[aq]t enabled by default because it isn\[aq]t easy
for rclone to tell if it will work between any two configurations.
.SS --size-only
.PP
Normally rclone will look at modification time and size of files to see
if they are equal.
If you set this flag then rclone will check only the size.
.PP
This can be useful transferring files from Dropbox which have been
modified by the desktop sync client which doesn\[aq]t set checksums of
modification times in the same way as rclone.
.SS --stats Duration
.PP
Commands which transfer data
(sync (https://rclone.org/commands/rclone_sync/),
copy (https://rclone.org/commands/rclone_copy/),
copyto (https://rclone.org/commands/rclone_copyto/),
move (https://rclone.org/commands/rclone_move/),
moveto (https://rclone.org/commands/rclone_moveto/)) will print data
transfer stats at regular intervals to show their progress.
.PP
This sets the interval.
.PP
The default is \f[V]1m\f[R].
Use \f[V]0\f[R] to disable.
.PP
If you set the stats interval then all commands can show stats.
This can be useful when running other commands, \f[V]check\f[R] or
\f[V]mount\f[R] for example.
.PP
Stats are logged at \f[V]INFO\f[R] level by default which means they
won\[aq]t show at default log level \f[V]NOTICE\f[R].
Use \f[V]--stats-log-level NOTICE\f[R] or \f[V]-v\f[R] to make them
show.
See the logging section for more info on log levels.
.PP
Note that on macOS you can send a SIGINFO (which is normally ctrl-T in
the terminal) to make the stats print immediately.
.SS --stats-file-name-length int
.PP
By default, the \f[V]--stats\f[R] output will truncate file names and
paths longer than 40 characters.
This is equivalent to providing \f[V]--stats-file-name-length 40\f[R].
Use \f[V]--stats-file-name-length 0\f[R] to disable any truncation of
file names printed by stats.
.SS --stats-log-level LogLevel
.PP
Log level to show \f[V]--stats\f[R] output at.
This can be \f[V]DEBUG\f[R], \f[V]INFO\f[R], \f[V]NOTICE\f[R], or
\f[V]ERROR\f[R].
The default is \f[V]INFO\f[R].
This means at the default level of logging, which is \f[V]NOTICE\f[R],
the stats won\[aq]t show - if you want them to then use
\f[V]--stats-log-level NOTICE\f[R].
See the logging section for more details on log levels.
.SS --stats-one-line
.PP
When this is specified, rclone condenses the stats into a single line
showing the most important stats only.
.SS --stats-one-line-date
.PP
When this is specified, rclone enables the single-line stats and
prepends the display with a date string.
The default is \f[V]2006/01/02 15:04:05 -\f[R]
.SS --stats-one-line-date-format string
.PP
When this is specified, rclone enables the single-line stats and
prepends the display with a user-supplied date string.
The date string MUST be enclosed in quotes.
Follow golang specs (https://golang.org/pkg/time/#Time.Format) for date
formatting syntax.
.SS --stats-unit string
.PP
By default, data transfer rates will be printed in bytes per second,
corresponding to \f[V]--stats-unit bytes\f[R].
.PP
This option allows the data rate to be printed in bits per second, by
specifying \f[V]--stats-unit bits\f[R].
Data transfer volume will still be reported in bytes.
.PP
The rate is reported as a binary unit, not SI unit.
So 1 Mbit/s equals 1,048,576 bit/s and not 1,000,000 bit/s.
.SS --suffix string
.PP
When using sync (https://rclone.org/commands/rclone_sync/),
copy (https://rclone.org/commands/rclone_copy/) or
move (https://rclone.org/commands/rclone_move/) any files which would
have been overwritten or deleted will have the suffix added to them.
If there is a file with the same path (after the suffix has been added),
then it will be overwritten.
.PP
The remote in use must support server-side move or copy and you must use
the same remote as the destination of the sync.
.PP
This is for use with files to add the suffix in the current directory or
with \f[V]--backup-dir\f[R].
See \f[V]--backup-dir\f[R] for more info.
.PP
For example
.IP
.nf
\f[C]
rclone copy --interactive /path/to/local/file remote:current --suffix .bak
\f[R]
.fi
.PP
will copy \f[V]/path/to/local\f[R] to \f[V]remote:current\f[R], but for
any files which would have been updated or deleted have .bak added.
.PP
If using \f[V]rclone sync\f[R] with \f[V]--suffix\f[R] and without
\f[V]--backup-dir\f[R] then it is recommended to put a filter rule in
excluding the suffix otherwise the \f[V]sync\f[R] will delete the backup
files.
.IP
.nf
\f[C]
rclone sync --interactive /path/to/local/file remote:current --suffix .bak --exclude \[dq]*.bak\[dq]
\f[R]
.fi
.SS --suffix-keep-extension
.PP
When using \f[V]--suffix\f[R], setting this causes rclone put the SUFFIX
before the extension of the files that it backs up rather than after.
.PP
So let\[aq]s say we had \f[V]--suffix -2019-01-01\f[R], without the flag
\f[V]file.txt\f[R] would be backed up to \f[V]file.txt-2019-01-01\f[R]
and with the flag it would be backed up to
\f[V]file-2019-01-01.txt\f[R].
This can be helpful to make sure the suffixed files can still be opened.
.PP
If a file has two (or more) extensions and the second (or subsequent)
extension is recognised as a valid mime type, then the suffix will go
before that extension.
So \f[V]file.tar.gz\f[R] would be backed up to
\f[V]file-2019-01-01.tar.gz\f[R] whereas \f[V]file.badextension.gz\f[R]
would be backed up to \f[V]file.badextension-2019-01-01.gz\f[R].
.SS --syslog
.PP
On capable OSes (not Windows or Plan9) send all log output to syslog.
.PP
This can be useful for running rclone in a script or
\f[V]rclone mount\f[R].
.SS --syslog-facility string
.PP
If using \f[V]--syslog\f[R] this sets the syslog facility (e.g.
\f[V]KERN\f[R], \f[V]USER\f[R]).
See \f[V]man syslog\f[R] for a list of possible facilities.
The default facility is \f[V]DAEMON\f[R].
.SS --temp-dir string
.PP
Specify the directory rclone will use for temporary files, to override
the default.
Make sure the directory exists and have accessible permissions.
.PP
By default the operating system\[aq]s temp directory will be used:
.IP \[bu] 2
On Unix systems, \f[V]$TMPDIR\f[R] if non-empty, else \f[V]/tmp\f[R].
.IP \[bu] 2
On Windows, the first non-empty value from \f[V]%TMP%\f[R],
\f[V]%TEMP%\f[R], \f[V]%USERPROFILE%\f[R], or the Windows directory.
.PP
When overriding the default with this option, the specified path will be
set as value of environment variable \f[V]TMPDIR\f[R] on Unix systems
and \f[V]TMP\f[R] and \f[V]TEMP\f[R] on Windows.
.PP
You can use the config
paths (https://rclone.org/commands/rclone_config_paths/) command to see
the current value.
.SS --tpslimit float
.PP
Limit transactions per second to this number.
Default is 0 which is used to mean unlimited transactions per second.
.PP
A transaction is roughly defined as an API call; its exact meaning will
depend on the backend.
For HTTP based backends it is an HTTP PUT/GET/POST/etc and its response.
For FTP/SFTP it is a round trip transaction over TCP.
.PP
For example, to limit rclone to 10 transactions per second use
\f[V]--tpslimit 10\f[R], or to 1 transaction every 2 seconds use
\f[V]--tpslimit 0.5\f[R].
.PP
Use this when the number of transactions per second from rclone is
causing a problem with the cloud storage provider (e.g.
getting you banned or rate limited).
.PP
This can be very useful for \f[V]rclone mount\f[R] to control the
behaviour of applications using it.
.PP
This limit applies to all HTTP based backends and to the FTP and SFTP
backends.
It does not apply to the local backend or the Storj backend.
.PP
See also \f[V]--tpslimit-burst\f[R].
.SS --tpslimit-burst int
.PP
Max burst of transactions for \f[V]--tpslimit\f[R] (default
\f[V]1\f[R]).
.PP
Normally \f[V]--tpslimit\f[R] will do exactly the number of transaction
per second specified.
However if you supply \f[V]--tps-burst\f[R] then rclone can save up some
transactions from when it was idle giving a burst of up to the parameter
supplied.
.PP
For example if you provide \f[V]--tpslimit-burst 10\f[R] then if rclone
has been idle for more than 10*\f[V]--tpslimit\f[R] then it can do 10
transactions very quickly before they are limited again.
.PP
This may be used to increase performance of \f[V]--tpslimit\f[R] without
changing the long term average number of transactions per second.
.SS --track-renames
.PP
By default, rclone doesn\[aq]t keep track of renamed files, so if you
rename a file locally then sync it to a remote, rclone will delete the
old file on the remote and upload a new copy.
.PP
An rclone sync with \f[V]--track-renames\f[R] runs like a normal sync,
but keeps track of objects which exist in the destination but not in the
source (which would normally be deleted), and which objects exist in the
source but not the destination (which would normally be transferred).
These objects are then candidates for renaming.
.PP
After the sync, rclone matches up the source only and destination only
objects using the \f[V]--track-renames-strategy\f[R] specified and
either renames the destination object or transfers the source and
deletes the destination object.
\f[V]--track-renames\f[R] is stateless like all of rclone\[aq]s syncs.
.PP
To use this flag the destination must support server-side copy or
server-side move, and to use a hash based
\f[V]--track-renames-strategy\f[R] (the default) the source and the
destination must have a compatible hash.
.PP
If the destination does not support server-side copy or move, rclone
will fall back to the default behaviour and log an error level message
to the console.
.PP
Encrypted destinations are not currently supported by
\f[V]--track-renames\f[R] if \f[V]--track-renames-strategy\f[R] includes
\f[V]hash\f[R].
.PP
Note that \f[V]--track-renames\f[R] is incompatible with
\f[V]--no-traverse\f[R] and that it uses extra memory to keep track of
all the rename candidates.
.PP
Note also that \f[V]--track-renames\f[R] is incompatible with
\f[V]--delete-before\f[R] and will select \f[V]--delete-after\f[R]
instead of \f[V]--delete-during\f[R].
.SS --track-renames-strategy string
.PP
This option changes the file matching criteria for
\f[V]--track-renames\f[R].
.PP
The matching is controlled by a comma separated selection of these
tokens:
.IP \[bu] 2
\f[V]modtime\f[R] - the modification time of the file - not supported on
all backends
.IP \[bu] 2
\f[V]hash\f[R] - the hash of the file contents - not supported on all
backends
.IP \[bu] 2
\f[V]leaf\f[R] - the name of the file not including its directory name
.IP \[bu] 2
\f[V]size\f[R] - the size of the file (this is always enabled)
.PP
The default option is \f[V]hash\f[R].
.PP
Using \f[V]--track-renames-strategy modtime,leaf\f[R] would match files
based on modification time, the leaf of the file name and the size only.
.PP
Using \f[V]--track-renames-strategy modtime\f[R] or \f[V]leaf\f[R] can
enable \f[V]--track-renames\f[R] support for encrypted destinations.
.PP
Note that the \f[V]hash\f[R] strategy is not supported with encrypted
destinations.
.SS --delete-(before,during,after)
.PP
This option allows you to specify when files on your destination are
deleted when you sync folders.
.PP
Specifying the value \f[V]--delete-before\f[R] will delete all files
present on the destination, but not on the source \f[I]before\f[R]
starting the transfer of any new or updated files.
This uses two passes through the file systems, one for the deletions and
one for the copies.
.PP
Specifying \f[V]--delete-during\f[R] will delete files while checking
and uploading files.
This is the fastest option and uses the least memory.
.PP
Specifying \f[V]--delete-after\f[R] (the default value) will delay
deletion of files until all new/updated files have been successfully
transferred.
The files to be deleted are collected in the copy pass then deleted
after the copy pass has completed successfully.
The files to be deleted are held in memory so this mode may use more
memory.
This is the safest mode as it will only delete files if there have been
no errors subsequent to that.
If there have been errors before the deletions start then you will get
the message \f[V]not deleting files as there were IO errors\f[R].
.SS --fast-list
.PP
When doing anything which involves a directory listing (e.g.
\f[V]sync\f[R], \f[V]copy\f[R], \f[V]ls\f[R] - in fact nearly every
command), rclone has different strategies to choose from.
.PP
The basic strategy is to list one directory and processes it before
using more directory lists to process any subdirectories.
This is a mandatory backend feature, called \f[V]List\f[R], which means
it is supported by all backends.
This strategy uses small amount of memory, and because it can be
parallelised it is fast for operations involving processing of the list
results.
.PP
Some backends provide the support for an alternative strategy, where all
files beneath a directory can be listed in one (or a small number) of
transactions.
Rclone supports this alternative strategy through an optional backend
feature called \f[V]ListR\f[R] (https://rclone.org/overview/#listr).
You can see in the storage system overview documentation\[aq]s optional
features (https://rclone.org/overview/#optional-features) section which
backends it is enabled for (these tend to be the bucket-based ones, e.g.
S3, B2, GCS, Swift).
This strategy requires fewer transactions for highly recursive
operations, which is important on backends where this is charged or
heavily rate limited.
It may be faster (due to fewer transactions) or slower (because it
can\[aq]t be parallelized) depending on different parameters, and may
require more memory if rclone has to keep the whole listing in memory.
.PP
Which listing strategy rclone picks for a given operation is
complicated, but in general it tries to choose the best possible.
It will prefer \f[V]ListR\f[R] in situations where it doesn\[aq]t need
to store the listed files in memory, e.g.
for unlimited recursive \f[V]ls\f[R] command variants.
In other situations it will prefer \f[V]List\f[R], e.g.
for \f[V]sync\f[R] and \f[V]copy\f[R], where it needs to keep the listed
files in memory, and is performing operations on them where
parallelization may be a huge advantage.
.PP
Rclone is not able to take all relevant parameters into account for
deciding the best strategy, and therefore allows you to influence the
choice in two ways: You can stop rclone from using \f[V]ListR\f[R] by
disabling the feature, using the --disable option
(\f[V]--disable ListR\f[R]), or you can allow rclone to use
\f[V]ListR\f[R] where it would normally choose not to do so due to
higher memory usage, using the \f[V]--fast-list\f[R] option.
Rclone should always produce identical results either way.
Using \f[V]--disable ListR\f[R] or \f[V]--fast-list\f[R] on a remote
which doesn\[aq]t support \f[V]ListR\f[R] does nothing, rclone will just
ignore it.
.PP
A rule of thumb is that if you pay for transactions and can fit your
entire sync listing into memory, then \f[V]--fast-list\f[R] is
recommended.
If you have a very big sync to do, then don\[aq]t use
\f[V]--fast-list\f[R], otherwise you will run out of memory.
Run some tests and compare before you decide, and if in doubt then just
leave the default, let rclone decide, i.e.
not use \f[V]--fast-list\f[R].
.SS --timeout Duration
.PP
This sets the IO idle timeout.
If a transfer has started but then becomes idle for this long it is
considered broken and disconnected.
.PP
The default is \f[V]5m\f[R].
Set to \f[V]0\f[R] to disable.
.SS --transfers int
.PP
The number of file transfers to run in parallel.
It can sometimes be useful to set this to a smaller number if the remote
is giving a lot of timeouts or bigger if you have lots of bandwidth and
a fast remote.
.PP
The default is to run 4 file transfers in parallel.
.PP
Look at --multi-thread-streams if you would like to control single file
transfers.
.SS -u, --update
.PP
This forces rclone to skip any files which exist on the destination and
have a modified time that is newer than the source file.
.PP
This can be useful in avoiding needless transfers when transferring to a
remote which doesn\[aq]t support modification times directly (or when
using \f[V]--use-server-modtime\f[R] to avoid extra API calls) as it is
more accurate than a \f[V]--size-only\f[R] check and faster than using
\f[V]--checksum\f[R].
On such remotes (or when using \f[V]--use-server-modtime\f[R]) the time
checked will be the uploaded time.
.PP
If an existing destination file has a modification time older than the
source file\[aq]s, it will be updated if the sizes are different.
If the sizes are the same, it will be updated if the checksum is
different or not available.
.PP
If an existing destination file has a modification time equal (within
the computed modify window) to the source file\[aq]s, it will be updated
if the sizes are different.
The checksum will not be checked in this case unless the
\f[V]--checksum\f[R] flag is provided.
.PP
In all other cases the file will not be updated.
.PP
Consider using the \f[V]--modify-window\f[R] flag to compensate for time
skews between the source and the backend, for backends that do not
support mod times, and instead use uploaded times.
However, if the backend does not support checksums, note that syncing or
copying within the time skew window may still result in additional
transfers for safety.
.SS --use-mmap
.PP
If this flag is set then rclone will use anonymous memory allocated by
mmap on Unix based platforms and VirtualAlloc on Windows for its
transfer buffers (size controlled by \f[V]--buffer-size\f[R]).
Memory allocated like this does not go on the Go heap and can be
returned to the OS immediately when it is finished with.
.PP
If this flag is not set then rclone will allocate and free the buffers
using the Go memory allocator which may use more memory as memory pages
are returned less aggressively to the OS.
.PP
It is possible this does not work well on all platforms so it is
disabled by default; in the future it may be enabled by default.
.SS --use-server-modtime
.PP
Some object-store backends (e.g, Swift, S3) do not preserve file
modification times (modtime).
On these backends, rclone stores the original modtime as additional
metadata on the object.
By default it will make an API call to retrieve the metadata when the
modtime is needed by an operation.
.PP
Use this flag to disable the extra API call and rely instead on the
server\[aq]s modified time.
In cases such as a local to remote sync using \f[V]--update\f[R],
knowing the local file is newer than the time it was last uploaded to
the remote is sufficient.
In those cases, this flag can speed up the process and reduce the number
of API calls necessary.
.PP
This flag is only supported on certain backends and will be silently
ignored on unsupported backends.
Supported backends include \f[V]azureblob\f[R],
\f[V]oracleobjectstorage\f[R], \f[V]s3\f[R], \f[V]swift\f[R].
.PP
Using this flag on a sync operation without also using
\f[V]--update\f[R] would cause all files modified at any time other than
the last upload time to be uploaded again, which is probably not what
you want.
.SS -v, -vv, --verbose
.PP
With \f[V]-v\f[R] rclone will tell you about each file that is
transferred and a small number of significant events.
.PP
With \f[V]-vv\f[R] rclone will become very verbose telling you about
every file it considers and transfers.
Please send bug reports with a log with this setting.
.PP
When setting verbosity as an environment variable, use
\f[V]RCLONE_VERBOSE=1\f[R] or \f[V]RCLONE_VERBOSE=2\f[R] for
\f[V]-v\f[R] and \f[V]-vv\f[R] respectively.
.SS -V, --version
.PP
Prints the version number
.SS SSL/TLS options
.PP
The outgoing SSL/TLS connections rclone makes can be controlled with
these options.
For example this can be very useful with the HTTP or WebDAV backends.
Rclone HTTP servers have their own set of configuration for SSL/TLS
which you can find in their documentation.
.SS --ca-cert stringArray
.PP
This loads the PEM encoded certificate authority certificates and uses
it to verify the certificates of the servers rclone connects to.
.PP
If you have generated certificates signed with a local CA then you will
need this flag to connect to servers using those certificates.
.SS --client-cert string
.PP
This loads the PEM encoded client side certificate.
.PP
This is used for mutual TLS
authentication (https://en.wikipedia.org/wiki/Mutual_authentication).
.PP
The \f[V]--client-key\f[R] flag is required too when using this.
.SS --client-key string
.PP
This loads the PEM encoded client side private key used for mutual TLS
authentication.
Used in conjunction with \f[V]--client-cert\f[R].
.PP
Supported types are:
.IP \[bu] 2
Unencrypted PKCS#1 (\[dq]BEGIN RSA PRIVATE KEY\[dq])
.IP \[bu] 2
Unencrypted PKCS#8 (\[dq]BEGIN PRIVATE KEY\[dq])
.IP \[bu] 2
Encrypted PKCS#8 (\[dq]BEGIN ENCRYPTED PRIVATE KEY\[dq])
.IP \[bu] 2
Legacy PEM encryption (e.g., DEK-Info headers), which are automatically
detected.
.SS --client-pass string
.PP
This can be used to supply an optional password to decrypt the client
key file.
.PP
\f[B]NB\f[R] the password should be obscured so it should be the output
of \f[V]rclone obscure YOURPASSWORD\f[R].
.SS --no-check-certificate
.PP
\f[V]--no-check-certificate\f[R] controls whether a client verifies the
server\[aq]s certificate chain and host name.
If \f[V]--no-check-certificate\f[R] is true, TLS accepts any certificate
presented by the server and any host name in that certificate.
In this mode, TLS is susceptible to man-in-the-middle attacks.
.PP
This option defaults to \f[V]false\f[R].
.PP
\f[B]This should be used only for testing.\f[R]
.SS Configuration encryption
.PP
Your configuration file contains information for logging in to your
cloud services.
This means that you should keep your \f[V]rclone.conf\f[R] file in a
secure location.
.PP
If you are in an environment where that isn\[aq]t possible, you can add
a password to your configuration.
This means that you will have to supply the password every time you
start rclone.
.PP
To add a password to your rclone configuration, execute
\f[V]rclone config\f[R].
.IP
.nf
\f[C]
$ rclone config
Current remotes:
e) Edit existing remote
n) New remote
d) Delete remote
s) Set configuration password
q) Quit config
e/n/d/s/q>
\f[R]
.fi
.PP
Go into \f[V]s\f[R], Set configuration password:
.IP
.nf
\f[C]
e/n/d/s/q> s
Your configuration is not encrypted.
If you add a password, you will protect your login information to cloud services.
a) Add Password
q) Quit to main menu
a/q> a
Enter NEW configuration password:
password:
Confirm NEW password:
password:
Password set
Your configuration is encrypted.
c) Change Password
u) Unencrypt configuration
q) Quit to main menu
c/u/q>
\f[R]
.fi
.PP
Your configuration is now encrypted, and every time you start rclone you
will have to supply the password.
See below for details.
In the same menu, you can change the password or completely remove
encryption from your configuration.
.PP
There is no way to recover the configuration if you lose your password.
.PP
You can also use
.IP \[bu] 2
rclone config encryption
set (https://rclone.org/commands/rclone_config_encryption_set/) to set
the config encryption directly
.IP \[bu] 2
rclone config encryption
remove (https://rclone.org/commands/rclone_config_encryption_remove/) to
remove it
.IP \[bu] 2
rclone config encryption
check (https://rclone.org/commands/rclone_config_encryption_check/) to
check that it is encrypted properly.
.PP
rclone uses nacl
secretbox (https://godoc.org/golang.org/x/crypto/nacl/secretbox) which
in turn uses XSalsa20 and Poly1305 to encrypt and authenticate your
configuration with secret-key cryptography.
The password is SHA-256 hashed, which produces the key for secretbox.
The hashed password is not stored.
.PP
While this provides very good security, we do not recommend storing your
encrypted rclone configuration in public if it contains sensitive
information, maybe except if you use a very strong password.
.PP
If it is safe in your environment, you can set the
\f[V]RCLONE_CONFIG_PASS\f[R] environment variable to contain your
password, in which case it will be used for decrypting the
configuration.
.PP
You can set this for a session from a script.
For unix like systems save this to a file called
\f[V]set-rclone-password\f[R]:
.IP
.nf
\f[C]
#!/bin/echo Source this file don\[aq]t run it
read -s RCLONE_CONFIG_PASS
export RCLONE_CONFIG_PASS
\f[R]
.fi
.PP
Then source the file when you want to use it.
From the shell you would do \f[V]source set-rclone-password\f[R].
It will then ask you for the password and set it in the environment
variable.
.PP
An alternate means of supplying the password is to provide a script
which will retrieve the password and print on standard output.
This script should have a fully specified path name and not rely on any
environment variables.
The script is supplied either via
\f[V]--password-command=\[dq]...\[dq]\f[R] command line argument or via
the \f[V]RCLONE_PASSWORD_COMMAND\f[R] environment variable.
.PP
One useful example of this is using the \f[V]passwordstore\f[R]
application to retrieve the password:
.IP
.nf
\f[C]
export RCLONE_PASSWORD_COMMAND=\[dq]pass rclone/config\[dq]
\f[R]
.fi
.PP
If the \f[V]passwordstore\f[R] password manager holds the password for
the rclone configuration, using the script method means the password is
primarily protected by the \f[V]passwordstore\f[R] system, and is never
embedded in the clear in scripts, nor available for examination using
the standard commands available.
It is quite possible with long running rclone sessions for copies of
passwords to be innocently captured in log files or terminal scroll
buffers, etc.
Using the script method of supplying the password enhances the security
of the config password considerably.
.PP
If you are running rclone inside a script, unless you are using the
\f[V]--password-command\f[R] method, you might want to disable password
prompts.
To do that, pass the parameter \f[V]--ask-password=false\f[R] to rclone.
This will make rclone fail instead of asking for a password if
\f[V]RCLONE_CONFIG_PASS\f[R] doesn\[aq]t contain a valid password, and
\f[V]--password-command\f[R] has not been supplied.
.PP
Whenever running commands that may be affected by options in a
configuration file, rclone will look for an existing file according to
the rules described above, and load any it finds.
If an encrypted file is found, this includes decrypting it, with the
possible consequence of a password prompt.
When executing a command line that you know are not actually using
anything from such a configuration file, you can avoid it being loaded
by overriding the location, e.g.
with one of the documented special values for memory-only configuration.
Since only backend options can be stored in configuration files, this is
normally unnecessary for commands that do not operate on backends, e.g.
\f[V]completion\f[R].
However, it will be relevant for commands that do operate on backends in
general, but are used without referencing a stored remote, e.g.
listing local filesystem paths, or connection strings:
\f[V]rclone --config=\[dq]\[dq] ls .\f[R]
.SS Configuration encryption cheatsheet
.PP
You can quickly apply a configuration encryption without plain-text at
rest or transfer.
Detailed instructions for popular OSes:
.SS Mac
.IP \[bu] 2
Generate and store a password
.RS 2
.IP
.nf
\f[C]
security add-generic-password -a rclone -s config -w $(openssl rand -base64 40)
\f[R]
.fi
.RE
.IP \[bu] 2
Add the retrieval instruction to your \f[V].zprofile\f[R] /
\f[V].profile\f[R]
.RS 2
.IP
.nf
\f[C]
export RCLONE_PASSWORD_COMMAND=\[dq]/usr/bin/security find-generic-password -a rclone -s config -w\[dq]
\f[R]
.fi
.RE
.SS Linux
.IP \[bu] 2
Prerequisite: Linux doesn\[aq]t come with a default password manager.
Let\[aq]s install the \[dq]pass\[dq] utility using a package manager,
e.g.
\f[V]apt install pass\f[R], \f[V]yum install pass\f[R],
etc. (https://www.passwordstore.org/#download); then initialize a
password store: \f[V]pass init rclone\f[R].
.IP \[bu] 2
Generate and store a password
.RS 2
.IP
.nf
\f[C]
echo $(openssl rand -base64 40) | pass insert -m rclone/config
\f[R]
.fi
.RE
.IP \[bu] 2
Add the retrieval instruction
.RS 2
.IP
.nf
\f[C]
export RCLONE_PASSWORD_COMMAND=\[dq]/usr/bin/pass rclone/config\[dq]
\f[R]
.fi
.RE
.SS Windows
.IP \[bu] 2
Generate and store a password
.RS 2
.IP
.nf
\f[C]
New-Object -TypeName PSCredential -ArgumentList \[dq]rclone\[dq], (ConvertTo-SecureString -String ([System.Web.Security.Membership]::GeneratePassword(40, 10)) -AsPlainText -Force) | Export-Clixml -Path \[dq]rclone-credential.xml\[dq]
\f[R]
.fi
.RE
.IP \[bu] 2
Add the password retrieval instruction
.RS 2
.IP
.nf
\f[C]
[Environment]::SetEnvironmentVariable(\[dq]RCLONE_PASSWORD_COMMAND\[dq], \[dq][System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR((Import-Clixml -Path \[dq]rclone-credential.xml\[dq]).Password))\[dq])
\f[R]
.fi
.RE
.SS Encrypt the config file (all systems)
.IP \[bu] 2
Execute \f[V]rclone config\f[R], and select option
\f[V]s) Set configuration password\f[R]
.IP \[bu] 2
Add/update the password from previous steps
.SS Developer options
.PP
These options are useful when developing or debugging rclone.
There are also some more remote specific options which aren\[aq]t
documented here which are used for testing.
These start with remote name e.g.
\f[V]--drive-test-option\f[R] - see the docs for the remote in question.
.SS --cpuprofile string
.PP
Write CPU profile to a file.
This can be analysed with \f[V]go tool pprof\f[R].
.SS --memprofile string
.PP
Write memory profile to a file.
This can be analysed with \f[V]go tool pprof\f[R].
.SS --dump DumpFlags
.PP
The \f[V]--dump\f[R] flag takes a comma separated list of flags to dump
info about.
.PP
Note that some headers, such as \f[V]Accept-Encoding\f[R], may not be
correct as shown in the request, and the response may not show
\f[V]Content-Encoding\f[R] if the go standard libraries auto gzip
encoding was in effect.
In this case the body of the request will be gunzipped before showing
it.
.PP
The available flags are:
.IP \[bu] 2
\f[V]headers\f[R] dumps HTTP headers.
Any \f[V]Authorization:\f[R] headers will be excluded, but output may
still contain sensitive information.
Can be very verbose.
Useful for debugging only.
Use \f[V]auth\f[R] if you do want the \f[V]Authorization:\f[R] headers.
.IP \[bu] 2
\f[V]auth\f[R] dumps HTTP headers like \f[V]headers\f[R], but also
includes any \f[V]Authorization:\f[R] headers.
This means the output will probably contain sensitive information.
Use \f[V]headers\f[R] to dump without \f[V]Authorization:\f[R] headers.
Can be very verbose.
Useful for debugging only.
This flag also makes the debug log of the config process (e.g.
\f[V]rclone config -vv\f[R]) show answers to questions, passwords and
tokens which are otherwise redacted.
.IP \[bu] 2
\f[V]bodies\f[R] dumps HTTP headers and bodies.
May contain sensitive info.
Can be very verbose.
Useful for debugging only.
Note that the bodies are buffered in memory so don\[aq]t use this for
enormous files.
.IP \[bu] 2
\f[V]requests\f[R] is similar to \f[V]bodies\f[R], but dumps the request
bodies and the response headers.
Useful for debugging download problems.
.IP \[bu] 2
\f[V]responses\f[R] is similar to \f[V]bodies\f[R], but dumps the
response bodies and the request headers.
Useful for debugging upload problems.
.IP \[bu] 2
\f[V]filters\f[R] dumps the filters.
Useful to see exactly what include and exclude options are filtering on.
.IP \[bu] 2
\f[V]goroutines\f[R] dumps a list of the running go-routines at the end
of the command.
.IP \[bu] 2
\f[V]openfiles\f[R] dumps a list of the open files at the end of the
command.
It uses the \f[V]lsof\f[R] Unix command to do that, so you\[aq]ll need
that installed to use it.
.IP \[bu] 2
\f[V]mapper\f[R] dumps the JSON blobs being sent to the program supplied
with \f[V]--metadata-mapper\f[R] and received from it.
It can be useful for debugging the metadata mapper interface.
.IP \[bu] 2
\f[V]curl\f[R] dumps the HTTP request as a \f[V]curl\f[R] command.
Can be used with the other HTTP debugging flags (e.g.
\f[V]requests\f[R], \f[V]bodies\f[R]).
By default the auth will be masked - use with \f[V]auth\f[R] to have the
curl commands with authentication too.
.IP \[bu] 2
\f[V]errors\f[R] only dumps the HTTP transactions which fail with a
retryable error - that is a transport error, an HTTP 429 (too many
requests) or an HTTP 5xx server error.
The other dump flags control what is dumped, so for example use
\f[V]--dump errors,bodies\f[R] to dump the headers and bodies of failed
transactions only.
On its own \f[V]--dump errors\f[R] dumps the headers.
This lets you capture first-failure diagnostics without the noise of
dumping every transaction.
May contain sensitive info.
.IP \[bu] 2
\f[V]trace\f[R] logs connection level events for each HTTP transaction
using Go\[aq]s \f[V]net/http/httptrace\f[R] - DNS resolution, TCP
connect, TLS handshake (including the negotiated TLS version, cipher,
ALPN protocol and server certificate), connection reuse, request write
and time to first response byte.
Each line is tagged with the time elapsed since the start of the
transaction so you can see where the time goes.
This is complementary to the other dump flags: it shows how the
connection behaved rather than what was sent, so it is useful for
debugging connectivity, DNS, TLS, proxy and keep-alive problems.
It does not dump headers or bodies - combine it with \f[V]headers\f[R]
or \f[V]bodies\f[R] for that.
.SS Filtering
.PP
For the filtering options
.IP \[bu] 2
\f[V]--delete-excluded\f[R]
.IP \[bu] 2
\f[V]--filter\f[R]
.IP \[bu] 2
\f[V]--filter-from\f[R]
.IP \[bu] 2
\f[V]--exclude\f[R]
.IP \[bu] 2
\f[V]--exclude-from\f[R]
.IP \[bu] 2
\f[V]--exclude-if-present\f[R]
.IP \[bu] 2
\f[V]--include\f[R]
.IP \[bu] 2
\f[V]--include-from\f[R]
.IP \[bu] 2
\f[V]--files-from\f[R]
.IP \[bu] 2
\f[V]--files-from-raw\f[R]
.IP \[bu] 2
\f[V]--files-from0\f[R]
.IP \[bu] 2
\f[V]--min-size\f[R]
.IP \[bu] 2
\f[V]--max-size\f[R]
.IP \[bu] 2
\f[V]--min-age\f[R]
.IP \[bu] 2
\f[V]--max-age\f[R]
.IP \[bu] 2
\f[V]--hash-filter\f[R]
.IP \[bu] 2
\f[V]--dump filters\f[R]
.IP \[bu] 2
\f[V]--metadata-include\f[R]
.IP \[bu] 2
\f[V]--metadata-include-from\f[R]
.IP \[bu] 2
\f[V]--metadata-exclude\f[R]
.IP \[bu] 2
\f[V]--metadata-exclude-from\f[R]
.IP \[bu] 2
\f[V]--metadata-filter\f[R]
.IP \[bu] 2
\f[V]--metadata-filter-from\f[R]
.PP
See the filtering section (https://rclone.org/filtering/).
.SS Remote control
.PP
For the remote control options and for instructions on how to remote
control rclone:
.IP \[bu] 2
\f[V]--rc\f[R]
.IP \[bu] 2
Anything starting with \f[V]--rc-\f[R]
.PP
See the remote control section (https://rclone.org/rc/).
.SS Logging
.PP
rclone has 4 levels of logging, \f[V]ERROR\f[R], \f[V]NOTICE\f[R],
\f[V]INFO\f[R] and \f[V]DEBUG\f[R].
.PP
By default, rclone logs to standard error.
This means you can redirect standard error and still see the normal
output of rclone commands (e.g.
\f[V]rclone ls\f[R]).
.PP
By default, rclone will produce \f[V]Error\f[R] and \f[V]Notice\f[R]
level messages.
.PP
If you use the \f[V]-q\f[R] flag, rclone will only produce
\f[V]Error\f[R] messages.
.PP
If you use the \f[V]-v\f[R] flag, rclone will produce \f[V]Error\f[R],
\f[V]Notice\f[R] and \f[V]Info\f[R] messages.
.PP
If you use the \f[V]-vv\f[R] flag, rclone will produce \f[V]Error\f[R],
\f[V]Notice\f[R], \f[V]Info\f[R] and \f[V]Debug\f[R] messages.
.PP
You can also control the log levels with the \f[V]--log-level\f[R] flag.
.PP
If you use the \f[V]--log-file\f[R] option, rclone will redirect
\f[V]Error\f[R], \f[V]Info\f[R] and \f[V]Debug\f[R] messages along with
standard error to a file.
.PP
If you use the \f[V]--syslog\f[R] flag then rclone will log to syslog
and the \f[V]--syslog-facility\f[R] control which facility it uses.
.PP
Rclone prefixes all log messages with their level in capitals, e.g.
INFO which makes it easy to grep the log file for different kinds of
information.
.SS Metrics
.PP
Rclone can publish metrics in the OpenMetrics/Prometheus format.
.PP
To enable the metrics endpoint, use the \f[V]--metrics-addr\f[R] flag.
Metrics can also be published on the \f[V]--rc-addr\f[R] port if the
\f[V]--rc\f[R] flag and \f[V]--rc-enable-metrics\f[R] flags are supplied
or if using rclone rcd \f[V]--rc-enable-metrics\f[R]
.PP
Rclone provides extensive configuration options for the metrics HTTP
endpoint.
These settings are grouped under the Metrics section and have a prefix
\f[V]--metrics-*\f[R].
.PP
When metrics are enabled with \f[V]--rc-enable-metrics\f[R], they will
be published on the same port as the rc API.
In this case, the \f[V]--metrics-*\f[R] flags will be ignored, and the
HTTP endpoint configuration will be managed by the \f[V]--rc-*\f[R]
parameters.
.SS Exit code
.PP
If any errors occur during the command execution, rclone will exit with
a non-zero exit code.
This allows scripts to detect when rclone operations have failed.
.PP
During the startup phase, rclone will exit immediately if an error is
detected in the configuration.
There will always be a log message immediately before exiting.
.PP
When rclone is running it will accumulate errors as it goes along, and
only exit with a non-zero exit code if (after retries) there were still
failed transfers.
For every error counted there will be a high priority log message
(visible with \f[V]-q\f[R]) showing the message and which file caused
the problem.
A high priority message is also shown when starting a retry so the user
can see that any previous error messages may not be valid after the
retry.
If rclone has done a retry it will log a high priority message if the
retry was successful.
.SS List of exit codes
.IP \[bu] 2
\f[V]0\f[R] - Success
.IP \[bu] 2
\f[V]1\f[R] - Error not otherwise categorised
.IP \[bu] 2
\f[V]2\f[R] - Syntax or usage error
.IP \[bu] 2
\f[V]3\f[R] - Directory not found
.IP \[bu] 2
\f[V]4\f[R] - File not found
.IP \[bu] 2
\f[V]5\f[R] - Temporary error (one that more retries might fix) (Retry
errors)
.IP \[bu] 2
\f[V]6\f[R] - Less serious errors (like 461 errors from dropbox)
(NoRetry errors)
.IP \[bu] 2
\f[V]7\f[R] - Fatal error (one that more retries won\[aq]t fix, like
account suspended) (Fatal errors)
.IP \[bu] 2
\f[V]8\f[R] - Transfer exceeded - limit set by --max-transfer reached
.IP \[bu] 2
\f[V]9\f[R] - Operation successful, but no files transferred (Requires
\f[V]--error-on-no-transfer\f[R])
.IP \[bu] 2
\f[V]10\f[R] - Duration exceeded - limit set by --max-duration reached
.SS Environment variables
.PP
Rclone can be configured entirely using environment variables.
These can be used to set defaults for options or config file entries.
.SS Options
.PP
Every option in rclone can have its default set by environment variable.
.PP
To find the name of the environment variable, first, take the long
option name, strip the leading \f[V]--\f[R], change \f[V]-\f[R] to
\f[V]_\f[R], make upper case and prepend \f[V]RCLONE_\f[R].
.PP
For example, to always set \f[V]--stats 5s\f[R], set the environment
variable \f[V]RCLONE_STATS=5s\f[R].
If you set stats on the command line this will override the environment
variable setting.
.PP
Or to always use the trash in drive \f[V]--drive-use-trash\f[R], set
\f[V]RCLONE_DRIVE_USE_TRASH=true\f[R].
.PP
Verbosity is slightly different, the environment variable equivalent of
\f[V]--verbose\f[R] or \f[V]-v\f[R] is \f[V]RCLONE_VERBOSE=1\f[R], or
for \f[V]-vv\f[R], \f[V]RCLONE_VERBOSE=2\f[R].
.PP
The same parser is used for the options and the environment variables so
they take exactly the same form.
.PP
The options set by environment variables can be seen with the
\f[V]-vv\f[R] flag, e.g.
\f[V]rclone version -vv\f[R].
.PP
Options that can appear multiple times (type \f[V]stringArray\f[R]) are
treated slightly differently as environment variables can only be
defined once.
In order to allow a simple mechanism for adding one or many items, the
input is treated as a CSV encoded (https://godoc.org/encoding/csv)
string.
For example
.PP
.TS
tab(@);
lw(36.7n) lw(33.3n).
T{
Environment variable
T}@T{
Equivalent options
T}
_
T{
\f[V]RCLONE_EXCLUDE=\[dq]*.jpg\[dq]\f[R]
T}@T{
\f[V]--exclude \[dq]*.jpg\[dq]\f[R]
T}
T{
\f[V]RCLONE_EXCLUDE=\[dq]*.jpg,*.png\[dq]\f[R]
T}@T{
\f[V]--exclude \[dq]*.jpg\[dq]\f[R] \f[V]--exclude \[dq]*.png\[dq]\f[R]
T}
T{
\f[V]RCLONE_EXCLUDE=\[aq]\[dq]*.jpg\[dq],\[dq]*.png\[dq]\[aq]\f[R]
T}@T{
\f[V]--exclude \[dq]*.jpg\[dq]\f[R] \f[V]--exclude \[dq]*.png\[dq]\f[R]
T}
T{
\f[V]RCLONE_EXCLUDE=\[aq]\[dq]/directory with comma , in it /**\[dq]\[aq]\f[R]
T}@T{
\[ga]--exclude \[dq]/directory with comma , in it /**\[dq]
T}
.TE
.PP
If \f[V]stringArray\f[R] options are defined as environment variables
\f[B]and\f[R] options on the command line then all the values will be
used.
.SS Config file
.PP
You can set defaults for values in the config file on an individual
remote basis.
The names of the config items are documented in the page for each
backend.
.PP
To find the name of the environment variable, you need to set, take
\f[V]RCLONE_CONFIG_\f[R] + name of remote + \f[V]_\f[R] + name of config
file option and make it all uppercase.
Note that the name of the remote is only converted to uppercase -
characters such as \f[V]-\f[R] and \f[V].\f[R] are not changed to
\f[V]_\f[R] - so a remote called \f[V]my-remote\f[R] needs
\f[V]RCLONE_CONFIG_MY-REMOTE_TYPE\f[R].
Many shells only allow letters, digits and \f[V]_\f[R] (underscore) in
environment variable names, so it is best to use only those characters
in the name of a remote you want to configure this way.
.PP
For example, to configure an S3 remote named \f[V]mys3:\f[R] without a
config file (using unix ways of setting environment variables):
.IP
.nf
\f[C]
$ export RCLONE_CONFIG_MYS3_TYPE=s3
$ export RCLONE_CONFIG_MYS3_ACCESS_KEY_ID=XXX
$ export RCLONE_CONFIG_MYS3_SECRET_ACCESS_KEY=XXX
$ rclone lsd mys3:
-1 2016-09-21 12:54:21 -1 my-bucket
$ rclone listremotes | grep mys3
mys3:
\f[R]
.fi
.PP
Note that if you want to create a remote using environment variables you
must create the \f[V]..._TYPE\f[R] variable as above.
.PP
Note that the name of a remote created using environment variable is
case insensitive, in contrast to regular remotes stored in config file
as documented above.
You must write the name in uppercase in the environment variable, but as
seen from example above it will be listed and can be accessed in
lowercase, while you can also refer to the same remote in uppercase:
.IP
.nf
\f[C]
$ rclone lsd mys3:
-1 2016-09-21 12:54:21 -1 my-bucket
$ rclone lsd MYS3:
-1 2016-09-21 12:54:21 -1 my-bucket
\f[R]
.fi
.PP
Note that you can only set the options of the immediate backend, so
RCLONE_CONFIG_MYS3CRYPT_ACCESS_KEY_ID has no effect, if myS3Crypt is a
crypt remote based on an S3 remote.
However RCLONE_S3_ACCESS_KEY_ID will set the access key of all remotes
using S3, including myS3Crypt.
.PP
Note also that now rclone has connection strings, it is probably easier
to use those instead which makes the above example
.IP
.nf
\f[C]
rclone lsd :s3,access_key_id=XXX,secret_access_key=XXX:
\f[R]
.fi
.SS Precedence
.PP
The various different methods of backend configuration are read in this
order and the first one with a value is used.
.IP \[bu] 2
Parameters in connection strings, e.g.
\f[V]myRemote,skip_links:\f[R]
.IP \[bu] 2
Flag values as supplied on the command line, e.g.
\f[V]--skip-links\f[R]
.IP \[bu] 2
Remote specific environment vars, e.g.
\f[V]RCLONE_CONFIG_MYREMOTE_SKIP_LINKS\f[R] (see above).
.IP \[bu] 2
Backend-specific environment vars, e.g.
\f[V]RCLONE_LOCAL_SKIP_LINKS\f[R].
.IP \[bu] 2
Backend generic environment vars, e.g.
\f[V]RCLONE_SKIP_LINKS\f[R].
.IP \[bu] 2
Config file, e.g.
\f[V]skip_links = true\f[R].
.IP \[bu] 2
Default values, e.g.
\f[V]false\f[R] - these can\[aq]t be changed.
.PP
So if both \f[V]--skip-links\f[R] is supplied on the command line and an
environment variable \f[V]RCLONE_LOCAL_SKIP_LINKS\f[R] is set, the
command line flag will take preference.
.PP
The backend configurations set by environment variables can be seen with
the \f[V]-vv\f[R] flag, e.g.
\f[V]rclone about myRemote: -vv\f[R].
.PP
For non backend configuration the order is as follows:
.IP \[bu] 2
Flag values as supplied on the command line, e.g.
\f[V]--stats 5s\f[R].
.IP \[bu] 2
Environment vars, e.g.
\f[V]RCLONE_STATS=5s\f[R].
.IP \[bu] 2
Default values, e.g.
\f[V]1m\f[R] - these can\[aq]t be changed.
.SS Other environment variables
.IP \[bu] 2
\f[V]RCLONE_CONFIG_PASS\f[R] set to contain your config file password
(see Configuration Encryption section)
.IP \[bu] 2
\f[V]HTTP_PROXY\f[R], \f[V]HTTPS_PROXY\f[R] and \f[V]NO_PROXY\f[R] (or
the lowercase versions thereof).
.RS 2
.IP \[bu] 2
\f[V]HTTPS_PROXY\f[R] takes precedence over \f[V]HTTP_PROXY\f[R] for
https requests.
.IP \[bu] 2
The environment values may be either a complete URL or a
\[dq]host[:port]\[dq] for, in which case the \[dq]http\[dq] scheme is
assumed.
.RE
.IP \[bu] 2
\f[V]USER\f[R] and \f[V]LOGNAME\f[R] values are used as fallbacks for
current username.
The primary method for looking up username is OS-specific: Windows API
on Windows, real user ID in /etc/passwd on Unix systems.
In the documentation the current username is simply referred to as
\f[V]$USER\f[R].
.IP \[bu] 2
\f[V]RCLONE_CONFIG_DIR\f[R] - rclone \f[B]sets\f[R] this variable for
use in config files and sub processes to point to the directory holding
the config file.
.PP
The options set by environment variables can be seen with the
\f[V]-vv\f[R] and \f[V]--log-level=DEBUG\f[R] flags, e.g.
\f[V]rclone version -vv\f[R].
.SH Configuring rclone on a remote / headless machine
.PP
Some of the configurations (those involving oauth2) require an
internet-connected web browser.
.PP
If you are trying to set rclone up on a remote or headless machine with
no browser available on it (e.g.
a NAS or a server in a datacenter), then you will need to use an
alternative means of configuration.
There are three ways of doing it, described below.
.SS Configuring using rclone authorize
.PP
On the headless machine run rclone config, but answer \f[V]N\f[R] to the
question
\f[V]Use web browser to automatically authenticate rclone with remote?\f[R].
.IP
.nf
\f[C]
Use web browser to automatically authenticate rclone with remote?
* Say Y if the machine running rclone has a web browser you can use
* Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.
y) Yes (default)
n) No
y/n> n
Option config_token.
For this to work, you will need rclone available on a machine that has
a web browser available.
For more help and alternate methods see: https://rclone.org/remote_setup/
Execute the following on the machine with the web browser (same rclone
version recommended):
rclone authorize \[dq]onedrive\[dq]
Then paste the result.
Enter a value.
config_token>
\f[R]
.fi
.PP
Then on your main desktop machine, run rclone
authorize (https://rclone.org/commands/rclone_authorize/).
.IP
.nf
\f[C]
rclone authorize \[dq]onedrive\[dq]
NOTICE: Make sure your Redirect URL is set to \[dq]http://localhost:53682/\[dq] in your custom config.
NOTICE: If your browser doesn\[aq]t open automatically go to the following link: http://127.0.0.1:53682/auth?state=xxxxxxxxxxxxxxxxxxxxxx
NOTICE: Log in and authorize rclone for access
NOTICE: Waiting for code...
Got code
Paste the following into your remote machine --->
SECRET_TOKEN
<---End paste
\f[R]
.fi
.PP
Then back to the headless machine, paste in the code.
.IP
.nf
\f[C]
config_token> SECRET_TOKEN
--------------------
[acd12]
client_id =
client_secret =
token = SECRET_TOKEN
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d>
\f[R]
.fi
.SS Configuring by copying the config file
.PP
Rclone stores all of its configuration in a single file.
This can easily be copied to configure a remote rclone (although some
backends do not support reusing the same configuration, consult your
backend documentation to be sure).
.PP
Start by running rclone config to create the configuration file on your
desktop machine.
.IP
.nf
\f[C]
rclone config
\f[R]
.fi
.PP
Then locate the file by running rclone config file.
.IP
.nf
\f[C]
$ rclone config file
Configuration file is stored at:
/home/user/.rclone.conf
\f[R]
.fi
.PP
Finally, transfer the file to the remote machine (scp, cut paste, ftp,
sftp, etc.)
and place it in the correct location (use rclone config file on the
remote machine to find out where).
.SS Configuring using SSH Tunnel
.PP
If you have an SSH client installed on your local machine, you can set
up an SSH tunnel to redirect the port 53682 into the headless machine by
using the following command:
.IP
.nf
\f[C]
ssh -L localhost:53682:localhost:53682 username\[at]remote_server
\f[R]
.fi
.PP
Then on the headless machine run rclone config and answer \f[V]Y\f[R] to
the question
\f[V]Use web browser to automatically authenticate rclone with remote?\f[R].
.IP
.nf
\f[C]
Use web browser to automatically authenticate rclone with remote?
* Say Y if the machine running rclone has a web browser you can use
* Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.
y) Yes (default)
n) No
y/n> y
NOTICE: Make sure your Redirect URL is set to \[dq]http://localhost:53682/\[dq] in your custom config.
NOTICE: If your browser doesn\[aq]t open automatically go to the following link: http://127.0.0.1:53682/auth?state=xxxxxxxxxxxxxxxxxxxxxx
NOTICE: Log in and authorize rclone for access
NOTICE: Waiting for code...
\f[R]
.fi
.PP
Finally, copy and paste the presented URL
\f[V]http://127.0.0.1:53682/auth?state=xxxxxxxxxxxxxxxxxxxxxx\f[R] to
the browser on your local machine, complete the auth and you are done.
.SH Filtering, includes and excludes
.PP
Filter flags determine which files rclone \f[V]sync\f[R],
\f[V]move\f[R], \f[V]ls\f[R], \f[V]lsl\f[R], \f[V]md5sum\f[R],
\f[V]sha1sum\f[R], \f[V]size\f[R], \f[V]delete\f[R], \f[V]check\f[R] and
similar commands apply to.
.PP
They are specified in terms of path/file name patterns; path/file lists;
file age and size, or presence of a file in a directory.
Bucket based remotes without the concept of directory apply filters to
object key, age and size in an analogous way.
.PP
Rclone \f[V]purge\f[R] does not obey filters.
.PP
To test filters without risk of damage to data, apply them to
\f[V]rclone ls\f[R], or with the \f[V]--dry-run\f[R] and \f[V]-vv\f[R]
flags.
.PP
Rclone filter patterns can only be used in filter command line options,
not in the specification of a remote.
.PP
E.g.
\f[V]rclone copy \[dq]remote:dir*.jpg\[dq] /path/to/dir\f[R] does not
have a filter effect.
\f[V]rclone copy remote:dir /path/to/dir --include \[dq]*.jpg\[dq]\f[R]
does.
.PP
\f[B]Important\f[R] Avoid mixing any two of \f[V]--include...\f[R],
\f[V]--exclude...\f[R] or \f[V]--filter...\f[R] flags in an rclone
command.
The results might not be what you expect.
Instead use a \f[V]--filter...\f[R] flag.
.SS Patterns for matching path/file names
.SS Pattern syntax
.PP
Here is a formal definition of the pattern syntax, examples are below.
.PP
Rclone matching rules follow a glob style:
.IP
.nf
\f[C]
* matches any sequence of non-separator (/) characters
** matches any sequence of characters including / separators
? matches any single non-separator (/) character
[ [ ! | \[ha] ] { character-range } ]
character class (must be non-empty)
{ pattern-list }
pattern alternatives
{{ regexp }}
regular expression to match
c matches character c (c != *, **, ?, \[rs], [, {, })
\[rs]c matches reserved character c (c = *, **, ?, \[rs], [, {, }) or character class
\f[R]
.fi
.PP
character-range:
.IP
.nf
\f[C]
c matches character c (c != \[rs], -, ])
\[rs]c matches reserved character c (c = \[rs], -, ])
lo - hi matches character c for lo <= c <= hi
\f[R]
.fi
.PP
pattern-list:
.IP
.nf
\f[C]
pattern { , pattern }
comma-separated (without spaces) patterns
\f[R]
.fi
.PP
character classes (see Go regular expression
reference (https://golang.org/pkg/regexp/syntax/)) include:
.IP
.nf
\f[C]
Named character classes (e.g. [\[rs]d], [\[ha]\[rs]d], [\[rs]D], [\[ha]\[rs]D])
Perl character classes (e.g. \[rs]s, \[rs]S, \[rs]w, \[rs]W)
ASCII character classes (e.g. [[:alnum:]], [[:alpha:]], [[:punct:]], [[:xdigit:]])
\f[R]
.fi
.PP
regexp for advanced users to insert a regular expression - see below for
more info:
.IP
.nf
\f[C]
Any re2 regular expression not containing \[ga]}}\[ga]
\f[R]
.fi
.PP
If the filter pattern starts with a \f[V]/\f[R] then it only matches at
the top level of the directory tree, \f[B]relative to the root of the
remote\f[R] (not necessarily the root of the drive).
If it does not start with \f[V]/\f[R] then it is matched starting at the
\f[B]end of the path/file name\f[R] but it only matches a complete path
element - it must match from a \f[V]/\f[R] separator or the beginning of
the path/file.
.IP
.nf
\f[C]
file.jpg - matches \[dq]file.jpg\[dq]
- matches \[dq]directory/file.jpg\[dq]
- doesn\[aq]t match \[dq]afile.jpg\[dq]
- doesn\[aq]t match \[dq]directory/afile.jpg\[dq]
/file.jpg - matches \[dq]file.jpg\[dq] in the root directory of the remote
- doesn\[aq]t match \[dq]afile.jpg\[dq]
- doesn\[aq]t match \[dq]directory/file.jpg\[dq]
\f[R]
.fi
.PP
The top level of the remote might not be the top level of the drive.
.PP
E.g.
for a Microsoft Windows local directory structure
.IP
.nf
\f[C]
F:
├── bkp
├── data
│ ├── excl
│ │ ├── 123.jpg
│ │ └── 456.jpg
│ ├── incl
│ │ └── document.pdf
\f[R]
.fi
.PP
To copy the contents of folder \f[V]data\f[R] into folder \f[V]bkp\f[R]
excluding the contents of subfolder \f[V]excl\f[R]the following command
treats \f[V]F:\[rs]data\f[R] and \f[V]F:\[rs]bkp\f[R] as top level for
filtering.
.PP
\f[V]rclone copy F:\[rs]data\[rs] F:\[rs]bkp\[rs] --exclude=/excl/**\f[R]
.PP
\f[B]Important\f[R] Use \f[V]/\f[R] in path/file name patterns and not
\f[V]\[rs]\f[R] even if running on Microsoft Windows.
.PP
Simple patterns are case sensitive unless the \f[V]--ignore-case\f[R]
flag is used.
.PP
Without \f[V]--ignore-case\f[R] (default)
.IP
.nf
\f[C]
potato - matches \[dq]potato\[dq]
- doesn\[aq]t match \[dq]POTATO\[dq]
\f[R]
.fi
.PP
With \f[V]--ignore-case\f[R]
.IP
.nf
\f[C]
potato - matches \[dq]potato\[dq]
- matches \[dq]POTATO\[dq]
\f[R]
.fi
.SS Using regular expressions in filter patterns
.PP
The syntax of filter patterns is glob style matching (like
\f[V]bash\f[R] uses) to make things easy for users.
However this does not provide absolute control over the matching, so for
advanced users rclone also provides a regular expression syntax.
.PP
Rclone generally accepts Perl-style regular expressions, the exact
syntax is defined in the Go regular expression
reference (https://golang.org/pkg/regexp/syntax/).
Regular expressions should be enclosed in \f[V]{{\f[R] \f[V]}}\f[R].
They will match only the last path segment if the glob doesn\[aq]t start
with \f[V]/\f[R] or the whole path name if it does.
Note that rclone does not attempt to parse the supplied regular
expression, meaning that using any regular expression filter will
prevent rclone from using directory filter rules, as it will instead
check every path against the supplied regular expression(s).
.PP
Here is how the \f[V]{{regexp}}\f[R] is transformed into an full regular
expression to match the entire path:
.IP
.nf
\f[C]
{{regexp}} becomes (\[ha]|/)(regexp)$
/{{regexp}} becomes \[ha](regexp)$
\f[R]
.fi
.PP
Regexp syntax can be mixed with glob syntax, for example
.IP
.nf
\f[C]
*.{{jpe?g}} to match file.jpg, file.jpeg but not file.png
\f[R]
.fi
.PP
You can also use regexp flags - to set case insensitive, for example
.IP
.nf
\f[C]
*.{{(?i)jpg}} to match file.jpg, file.JPG but not file.png
\f[R]
.fi
.PP
Be careful with wildcards in regular expressions - you don\[aq]t want
them to match path separators normally.
To match any file name starting with \f[V]start\f[R] and ending with
\f[V]end\f[R] write
.IP
.nf
\f[C]
{{start[\[ha]/]*end\[rs].jpg}}
\f[R]
.fi
.PP
Not
.IP
.nf
\f[C]
{{start.*end\[rs].jpg}}
\f[R]
.fi
.PP
Which will match a directory called \f[V]start\f[R] with a file called
\f[V]end.jpg\f[R] in it as the \f[V].*\f[R] will match \f[V]/\f[R]
characters.
.PP
Note that you can use \f[V]-vv --dump filters\f[R] to show the filter
patterns in regexp format - rclone implements the glob patterns by
transforming them into regular expressions.
.SS Filter pattern examples
.PP
.TS
tab(@);
lw(19.2n) lw(14.0n) lw(12.2n) lw(24.5n).
T{
Description
T}@T{
Pattern
T}@T{
Matches
T}@T{
Does not match
T}
_
T{
Wildcard
T}@T{
\f[V]*.jpg\f[R]
T}@T{
\f[V]/file.jpg\f[R]
T}@T{
\f[V]/file.png\f[R]
T}
T{
T}@T{
T}@T{
\f[V]/dir/file.jpg\f[R]
T}@T{
\f[V]/dir/file.png\f[R]
T}
T{
Rooted
T}@T{
\f[V]/*.jpg\f[R]
T}@T{
\f[V]/file.jpg\f[R]
T}@T{
\f[V]/file.png\f[R]
T}
T{
T}@T{
T}@T{
\f[V]/file2.jpg\f[R]
T}@T{
\f[V]/dir/file.jpg\f[R]
T}
T{
Alternates
T}@T{
\f[V]*.{jpg,png}\f[R]
T}@T{
\f[V]/file.jpg\f[R]
T}@T{
\f[V]/file.gif\f[R]
T}
T{
T}@T{
T}@T{
\f[V]/dir/file.png\f[R]
T}@T{
\f[V]/dir/file.gif\f[R]
T}
T{
Path Wildcard
T}@T{
\f[V]dir/**\f[R]
T}@T{
\f[V]/dir/anyfile\f[R]
T}@T{
\f[V]file.png\f[R]
T}
T{
T}@T{
T}@T{
\f[V]/subdir/dir/subsubdir/anyfile\f[R]
T}@T{
\f[V]/subdir/file.png\f[R]
T}
T{
Any Char
T}@T{
\f[V]*.t?t\f[R]
T}@T{
\f[V]/file.txt\f[R]
T}@T{
\f[V]/file.qxt\f[R]
T}
T{
T}@T{
T}@T{
\f[V]/dir/file.tzt\f[R]
T}@T{
\f[V]/dir/file.png\f[R]
T}
T{
Range
T}@T{
\f[V]*.[a-z]\f[R]
T}@T{
\f[V]/file.a\f[R]
T}@T{
\f[V]/file.0\f[R]
T}
T{
T}@T{
T}@T{
\f[V]/dir/file.b\f[R]
T}@T{
\f[V]/dir/file.1\f[R]
T}
T{
Escape
T}@T{
\f[V]*.\[rs]?\[rs]?\[rs]?\f[R]
T}@T{
\f[V]/file.???\f[R]
T}@T{
\f[V]/file.abc\f[R]
T}
T{
T}@T{
T}@T{
\f[V]/dir/file.???\f[R]
T}@T{
\f[V]/dir/file.def\f[R]
T}
T{
Class
T}@T{
\f[V]*.\[rs]d\[rs]d\[rs]d\f[R]
T}@T{
\f[V]/file.012\f[R]
T}@T{
\f[V]/file.abc\f[R]
T}
T{
T}@T{
T}@T{
\f[V]/dir/file.345\f[R]
T}@T{
\f[V]/dir/file.def\f[R]
T}
T{
Regexp
T}@T{
\f[V]*.{{jpe?g}}\f[R]
T}@T{
\f[V]/file.jpeg\f[R]
T}@T{
\f[V]/file.png\f[R]
T}
T{
T}@T{
T}@T{
\f[V]/dir/file.jpg\f[R]
T}@T{
\f[V]/dir/file.jpeeg\f[R]
T}
T{
Rooted Regexp
T}@T{
\f[V]/{{.*\[rs].jpe?g}}\f[R]
T}@T{
\f[V]/file.jpeg\f[R]
T}@T{
\f[V]/file.png\f[R]
T}
T{
T}@T{
T}@T{
\f[V]/file.jpg\f[R]
T}@T{
\f[V]/dir/file.jpg\f[R]
T}
.TE
.SS How filter rules are applied to files
.PP
Rclone path/file name filters are made up of one or more of the
following flags:
.IP \[bu] 2
\f[V]--include\f[R]
.IP \[bu] 2
\f[V]--include-from\f[R]
.IP \[bu] 2
\f[V]--exclude\f[R]
.IP \[bu] 2
\f[V]--exclude-from\f[R]
.IP \[bu] 2
\f[V]--filter\f[R]
.IP \[bu] 2
\f[V]--filter-from\f[R]
.PP
There can be more than one instance of individual flags.
.PP
Rclone internally uses a combined list of all the include and exclude
rules.
The order in which rules are processed can influence the result of the
filter.
.PP
All flags of the same type are processed together in the order above,
regardless of what order the different types of flags are included on
the command line.
.PP
Multiple instances of the same flag are processed from left to right
according to their position in the command line.
.PP
To mix up the order of processing includes and excludes use
\f[V]--filter...\f[R] flags.
.PP
Within \f[V]--include-from\f[R], \f[V]--exclude-from\f[R] and
\f[V]--filter-from\f[R] flags rules are processed from top to bottom of
the referenced file.
.PP
If there is an \f[V]--include\f[R] or \f[V]--include-from\f[R] flag
specified, rclone implies a \f[V]- **\f[R] rule which it adds to the
bottom of the internal rule list.
Specifying a \f[V]+\f[R] rule with a \f[V]--filter...\f[R] flag does not
imply that rule.
.PP
Each path/file name passed through rclone is matched against the
combined filter list.
At first match to a rule the path/file name is included or excluded and
no further filter rules are processed for that path/file.
.PP
If rclone does not find a match, after testing against all rules
(including the implied rule if appropriate), the path/file name is
included.
.PP
Any path/file included at that stage is processed by the rclone command.
.PP
\f[V]--files-from\f[R], \f[V]--files-from-raw\f[R] and
\f[V]--files-from0\f[R] flags over-ride and cannot be combined with
other filter options.
.PP
To see the internal combined rule list, in regular expression form, for
a command add the \f[V]--dump filters\f[R] flag.
Running an rclone command with \f[V]--dump filters\f[R] and
\f[V]-vv\f[R] flags lists the internal filter elements and shows how
they are applied to each source path/file.
There is not currently a means provided to pass regular expression
filter options into rclone directly though character class filter rules
contain character classes.
Go regular expression reference (https://golang.org/pkg/regexp/syntax/)
.SS How filter rules are applied to directories
.PP
Rclone commands are applied to path/file names not directories.
The entire contents of a directory can be matched to a filter by the
pattern \f[V]directory/*\f[R] or recursively by \f[V]directory/**\f[R].
.PP
Directory filter rules are defined with a closing \f[V]/\f[R] separator.
.PP
E.g.
\f[V]/directory/subdirectory/\f[R] is an rclone directory filter rule.
.PP
Rclone commands can use directory filter rules to determine whether they
recurse into subdirectories.
This potentially optimises access to a remote by avoiding listing
unnecessary directories.
Whether optimisation is desirable depends on the specific filter rules
and source remote content.
.PP
If any regular expression filters are in use, then no directory
recursion optimisation is possible, as rclone must check every path
against the supplied regular expression(s).
.PP
Directory recursion optimisation occurs if either:
.IP \[bu] 2
A source remote does not support the rclone \f[V]ListR\f[R] primitive.
local, sftp, Microsoft OneDrive and WebDAV do not support
\f[V]ListR\f[R].
Google Drive and most bucket type storage do.
Full list (https://rclone.org/overview/#optional-features)
.IP \[bu] 2
On other remotes (those that support \f[V]ListR\f[R]), if the rclone
command is not naturally recursive, and provided it is not run with the
\f[V]--fast-list\f[R] flag.
\f[V]ls\f[R], \f[V]lsf -R\f[R] and \f[V]size\f[R] are naturally
recursive but \f[V]sync\f[R], \f[V]copy\f[R] and \f[V]move\f[R] are not.
.IP \[bu] 2
Whenever the \f[V]--disable ListR\f[R] flag is applied to an rclone
command.
.PP
Rclone commands imply directory filter rules from path/file filter
rules.
To view the directory filter rules rclone has implied for a command
specify the \f[V]--dump filters\f[R] flag.
.PP
E.g.
for an include rule
.IP
.nf
\f[C]
/a/*.jpg
\f[R]
.fi
.PP
Rclone implies the directory include rule
.IP
.nf
\f[C]
/a/
\f[R]
.fi
.PP
Directory filter rules specified in an rclone command can limit the
scope of an rclone command but path/file filters still have to be
specified.
.PP
E.g.
\f[V]rclone ls remote: --include /directory/\f[R] will not match any
files.
Because it is an \f[V]--include\f[R] option the \f[V]--exclude **\f[R]
rule is implied, and the \f[V]/directory/\f[R] pattern serves only to
optimise access to the remote by ignoring everything outside of that
directory.
.PP
E.g.
\f[V]rclone ls remote: --filter-from filter-list.txt\f[R] with a file
\f[V]filter-list.txt\f[R]:
.IP
.nf
\f[C]
- /dir1/
- /dir2/
+ *.pdf
- **
\f[R]
.fi
.PP
All files in directories \f[V]dir1\f[R] or \f[V]dir2\f[R] or their
subdirectories are completely excluded from the listing.
Only files of suffix \f[V]pdf\f[R] in the root of \f[V]remote:\f[R] or
its subdirectories are listed.
The \f[V]- **\f[R] rule prevents listing of any path/files not
previously matched by the rules above.
.PP
Option \f[V]exclude-if-present\f[R] creates a directory exclude rule
based on the presence of a file in a directory and takes precedence over
other rclone directory filter rules.
.PP
When using pattern list syntax, if a pattern item contains either
\f[V]/\f[R] or \f[V]**\f[R], then rclone will not able to imply a
directory filter rule from this pattern list.
.PP
E.g.
for an include rule
.IP
.nf
\f[C]
{dir1/**,dir2/**}
\f[R]
.fi
.PP
Rclone will match files below directories \f[V]dir1\f[R] or
\f[V]dir2\f[R] only, but will not be able to use this filter to exclude
a directory \f[V]dir3\f[R] from being traversed.
.PP
Directory recursion optimisation may affect performance, but normally
not the result.
One exception to this is sync operations with option
\f[V]--create-empty-src-dirs\f[R], where any traversed empty directories
will be created.
With the pattern list example \f[V]{dir1/**,dir2/**}\f[R] above, this
would create an empty directory \f[V]dir3\f[R] on destination (when it
exists on source).
Changing the filter to \f[V]{dir1,dir2}/**\f[R], or splitting it into
two include rules \f[V]--include dir1/** --include dir2/**\f[R], will
match the same files while also filtering directories, with the result
that an empty directory \f[V]dir3\f[R] will no longer be created.
.SS \f[V]--exclude\f[R] - Exclude files matching pattern
.PP
Excludes path/file names from an rclone command based on a single
exclude rule.
.PP
This flag can be repeated.
See above for the order filter flags are processed in.
.PP
\f[V]--exclude\f[R] should not be used with \f[V]--include\f[R],
\f[V]--include-from\f[R], \f[V]--filter\f[R] or \f[V]--filter-from\f[R]
flags.
.PP
\f[V]--exclude\f[R] has no effect when combined with
\f[V]--files-from\f[R], \f[V]--files-from-raw\f[R] or
\f[V]--files-from0\f[R] flags.
.PP
E.g.
\f[V]rclone ls remote: --exclude *.bak\f[R] excludes all .bak files from
listing.
.PP
E.g.
\f[V]rclone size remote: --exclude \[dq]/dir/**\[dq]\f[R] returns the
total size of all files on \f[V]remote:\f[R] excluding those in root
directory \f[V]dir\f[R] and sub directories.
.PP
E.g.
on Microsoft Windows
\f[V]rclone ls remote: --exclude \[dq]*\[rs][{JP,KR,HK}\[rs]]*\[dq]\f[R]
lists the files in \f[V]remote:\f[R] without \f[V][JP]\f[R] or
\f[V][KR]\f[R] or \f[V][HK]\f[R] in their name.
Quotes prevent the shell from interpreting the \f[V]\[rs]\f[R]
characters.\f[V]\[rs]\f[R] characters escape the \f[V][\f[R] and
\f[V]]\f[R] so an rclone filter treats them literally rather than as a
character-range.
The \f[V]{\f[R] and \f[V]}\f[R] define an rclone pattern list.
For other operating systems single quotes are required ie
\f[V]rclone ls remote: --exclude \[aq]*\[rs][{JP,KR,HK}\[rs]]*\[aq]\f[R]
.SS \f[V]--exclude-from\f[R] - Read exclude patterns from file
.PP
Excludes path/file names from an rclone command based on rules in a
named file.
The file contains a list of remarks and pattern rules.
.PP
For an example \f[V]exclude-file.txt\f[R]:
.IP
.nf
\f[C]
# a sample exclude rule file
*.bak
file2.jpg
\f[R]
.fi
.PP
\f[V]rclone ls remote: --exclude-from exclude-file.txt\f[R] lists the
files on \f[V]remote:\f[R] except those named \f[V]file2.jpg\f[R] or
with a suffix \f[V].bak\f[R].
That is equivalent to
\f[V]rclone ls remote: --exclude file2.jpg --exclude \[dq]*.bak\[dq]\f[R].
.PP
This flag can be repeated.
See above for the order filter flags are processed in.
.PP
The \f[V]--exclude-from\f[R] flag is useful where multiple exclude
filter rules are applied to an rclone command.
.PP
\f[V]--exclude-from\f[R] should not be used with \f[V]--include\f[R],
\f[V]--include-from\f[R], \f[V]--filter\f[R] or \f[V]--filter-from\f[R]
flags.
.PP
\f[V]--exclude-from\f[R] has no effect when combined with
\f[V]--files-from\f[R], \f[V]--files-from-raw\f[R] or
\f[V]--files-from0\f[R] flags.
.PP
\f[V]--exclude-from\f[R] followed by \f[V]-\f[R] reads filter rules from
standard input.
.SS \f[V]--include\f[R] - Include files matching pattern
.PP
Adds a single include rule based on path/file names to an rclone
command.
.PP
This flag can be repeated.
See above for the order filter flags are processed in.
.PP
\f[V]--include\f[R] has no effect when combined with
\f[V]--files-from\f[R], \f[V]--files-from-raw\f[R] or
\f[V]--files-from0\f[R] flags.
.PP
\f[V]--include\f[R] implies \f[V]--exclude **\f[R] at the end of an
rclone internal filter list.
Therefore if you mix \f[V]--include\f[R] and \f[V]--include-from\f[R]
flags with \f[V]--exclude\f[R], \f[V]--exclude-from\f[R],
\f[V]--filter\f[R] or \f[V]--filter-from\f[R], you must use include
rules for all the files you want in the include statement.
For more flexibility use the \f[V]--filter-from\f[R] flag.
.PP
E.g.
\f[V]rclone ls remote: --include \[dq]*.{png,jpg}\[dq]\f[R] lists the
files on \f[V]remote:\f[R] with suffix \f[V].png\f[R] and
\f[V].jpg\f[R].
All other files are excluded.
.PP
E.g.
multiple rclone copy commands can be combined with \f[V]--include\f[R]
and a pattern-list.
.IP
.nf
\f[C]
rclone copy /vol1/A remote:A
rclone copy /vol1/B remote:B
\f[R]
.fi
.PP
is equivalent to:
.IP
.nf
\f[C]
rclone copy /vol1 remote: --include \[dq]{A,B}/**\[dq]
\f[R]
.fi
.PP
E.g.
\f[V]rclone ls remote:/wheat --include \[dq]??[\[ha][:punct:]]*\[dq]\f[R]
lists the files \f[V]remote:\f[R] directory \f[V]wheat\f[R] (and
subdirectories) whose third character is not punctuation.
This example uses an ASCII character
class (https://golang.org/pkg/regexp/syntax/).
.SS \f[V]--include-from\f[R] - Read include patterns from file
.PP
Adds path/file names to an rclone command based on rules in a named
file.
The file contains a list of remarks and pattern rules.
.PP
For an example \f[V]include-file.txt\f[R]:
.IP
.nf
\f[C]
# a sample include rule file
*.jpg
file2.avi
\f[R]
.fi
.PP
\f[V]rclone ls remote: --include-from include-file.txt\f[R] lists the
files on \f[V]remote:\f[R] with name \f[V]file2.avi\f[R] or suffix
\f[V].jpg\f[R].
That is equivalent to
\f[V]rclone ls remote: --include file2.avi --include \[dq]*.jpg\[dq]\f[R].
.PP
This flag can be repeated.
See above for the order filter flags are processed in.
.PP
The \f[V]--include-from\f[R] flag is useful where multiple include
filter rules are applied to an rclone command.
.PP
\f[V]--include-from\f[R] implies \f[V]--exclude **\f[R] at the end of an
rclone internal filter list.
Therefore if you mix \f[V]--include\f[R] and \f[V]--include-from\f[R]
flags with \f[V]--exclude\f[R], \f[V]--exclude-from\f[R],
\f[V]--filter\f[R] or \f[V]--filter-from\f[R], you must use include
rules for all the files you want in the include statement.
For more flexibility use the \f[V]--filter-from\f[R] flag.
.PP
\f[V]--include-from\f[R] has no effect when combined with
\f[V]--files-from\f[R], \f[V]--files-from-raw\f[R] or
\f[V]--files-from0\f[R] flags.
.PP
\f[V]--include-from\f[R] followed by \f[V]-\f[R] reads filter rules from
standard input.
.SS \f[V]--filter\f[R] - Add a file-filtering rule
.PP
Specifies path/file names to an rclone command, based on a single
include or exclude rule, in \f[V]+\f[R] or \f[V]-\f[R] format.
.PP
This flag can be repeated.
See above for the order filter flags are processed in.
.PP
\f[V]--filter +\f[R] differs from \f[V]--include\f[R].
In the case of \f[V]--include\f[R] rclone implies an
\f[V]--exclude *\f[R] rule which it adds to the bottom of the internal
rule list.
\f[V]--filter...+\f[R] does not imply that rule.
.PP
\f[V]--filter\f[R] has no effect when combined with
\f[V]--files-from\f[R], \f[V]--files-from-raw\f[R] or
\f[V]--files-from0\f[R] flags.
.PP
\f[V]--filter\f[R] should not be used with \f[V]--include\f[R],
\f[V]--include-from\f[R], \f[V]--exclude\f[R] or
\f[V]--exclude-from\f[R] flags.
.PP
E.g.
\f[V]rclone ls remote: --filter \[dq]- *.bak\[dq]\f[R] excludes all
\f[V].bak\f[R] files from a list of \f[V]remote:\f[R].
.SS \f[V]--filter-from\f[R] - Read filtering patterns from a file
.PP
Adds path/file names to an rclone command based on rules in a named
file.
The file contains a list of remarks and pattern rules.
Include rules start with \f[V]+\f[R] and exclude rules with \f[V]-\f[R].
\f[V]!\f[R] clears existing rules.
Rules are processed in the order they are defined.
.PP
This flag can be repeated.
See above for the order filter flags are processed in.
.PP
Arrange the order of filter rules with the most restrictive first and
work down.
.PP
Lines starting with # or ; are ignored, and can be used to write
comments.
Inline comments are not supported.
\f[I]Use \f[VI]-vv --dump filters\f[I] to see how they appear in the
final regexp.\f[R]
.PP
E.g.
for \f[V]filter-file.txt\f[R]:
.IP
.nf
\f[C]
# a sample filter rule file
- secret*.jpg
+ *.jpg
+ *.png
+ file2.avi
- /dir/tmp/** # WARNING! This text will be treated as part of the path.
- /dir/Trash/**
+ /dir/**
# exclude everything else
- *
\f[R]
.fi
.PP
\f[V]rclone ls remote: --filter-from filter-file.txt\f[R] lists the
path/files on \f[V]remote:\f[R] including all \f[V]jpg\f[R] and
\f[V]png\f[R] files, excluding any matching \f[V]secret*.jpg\f[R] and
including \f[V]file2.avi\f[R].
It also includes everything in the directory \f[V]dir\f[R] at the root
of \f[V]remote\f[R], except \f[V]remote:dir/Trash\f[R] which it
excludes.
Everything else is excluded.
.PP
E.g.
for an alternative \f[V]filter-file.txt\f[R]:
.IP
.nf
\f[C]
- secret*.jpg
+ *.jpg
+ *.png
+ file2.avi
- *
\f[R]
.fi
.PP
Files \f[V]file1.jpg\f[R], \f[V]file3.png\f[R] and \f[V]file2.avi\f[R]
are listed whilst \f[V]secret17.jpg\f[R] and files without the suffix
\f[V].jpg\f[R] or \f[V].png\f[R] are excluded.
.PP
E.g.
for an alternative \f[V]filter-file.txt\f[R]:
.IP
.nf
\f[C]
+ *.jpg
+ *.gif
!
+ 42.doc
- *
\f[R]
.fi
.PP
Only file 42.doc is listed.
Prior rules are cleared by the \f[V]!\f[R].
.SS \f[V]--files-from\f[R] - Read list of source-file names
.PP
Adds path/files to an rclone command from a list in a named file.
Rclone processes the path/file names in the order of the list, and no
others.
.PP
Other filter flags (\f[V]--include\f[R], \f[V]--include-from\f[R],
\f[V]--exclude\f[R], \f[V]--exclude-from\f[R], \f[V]--filter\f[R] and
\f[V]--filter-from\f[R]) are ignored when \f[V]--files-from\f[R],
\f[V]--files-from-raw\f[R] or \f[V]--files-from0\f[R] is used.
.PP
\f[V]--files-from\f[R] expects a list of files as its input.
Leading or trailing whitespace is stripped from the input lines.
Lines starting with \f[V]#\f[R] or \f[V];\f[R] are ignored.
.PP
\f[V]--files-from\f[R] followed by \f[V]-\f[R] reads the list of files
from standard input.
.PP
Rclone commands with a \f[V]--files-from\f[R] flag traverse the remote,
treating the names in \f[V]--files-from\f[R] as a set of filters.
.PP
If the \f[V]--no-traverse\f[R] and \f[V]--files-from\f[R] flags are used
together an rclone command does not traverse the remote.
Instead it addresses each path/file named in the file individually.
For each path/file name, that requires typically 1 API call.
This can be efficient for a short \f[V]--files-from\f[R] list and a
remote containing many files.
.PP
Rclone commands do not error if any names in the \f[V]--files-from\f[R]
file are missing from the source remote.
.PP
The \f[V]--files-from\f[R] flag can be repeated in a single rclone
command to read path/file names from more than one file.
The files are read from left to right along the command line.
.PP
Paths within the \f[V]--files-from\f[R] file are interpreted as starting
with the root specified in the rclone command.
Leading \f[V]/\f[R] separators are ignored.
See --files-from-raw if you need the input to be processed in a raw
manner.
.PP
E.g.
for a file \f[V]files-from.txt\f[R]:
.IP
.nf
\f[C]
# comment
file1.jpg
subdir/file2.jpg
\f[R]
.fi
.PP
\f[V]rclone copy --files-from files-from.txt /home/me/pics remote:pics\f[R]
copies the following, if they exist, and only those files.
.IP
.nf
\f[C]
/home/me/pics/file1.jpg → remote:pics/file1.jpg
/home/me/pics/subdir/file2.jpg → remote:pics/subdir/file2.jpg
\f[R]
.fi
.PP
E.g.
to copy the following files referenced by their absolute paths:
.IP
.nf
\f[C]
/home/user1/42
/home/user1/dir/ford
/home/user2/prefect
\f[R]
.fi
.PP
First find a common subdirectory - in this case \f[V]/home\f[R] and put
the remaining files in \f[V]files-from.txt\f[R] with or without leading
\f[V]/\f[R], e.g.
.IP
.nf
\f[C]
user1/42
user1/dir/ford
user2/prefect
\f[R]
.fi
.PP
Then copy these to a remote:
.IP
.nf
\f[C]
rclone copy --files-from files-from.txt /home remote:backup
\f[R]
.fi
.PP
The three files are transferred as follows:
.IP
.nf
\f[C]
/home/user1/42 → remote:backup/user1/important
/home/user1/dir/ford → remote:backup/user1/dir/file
/home/user2/prefect → remote:backup/user2/stuff
\f[R]
.fi
.PP
Alternatively if \f[V]/\f[R] is chosen as root \f[V]files-from.txt\f[R]
will be:
.IP
.nf
\f[C]
/home/user1/42
/home/user1/dir/ford
/home/user2/prefect
\f[R]
.fi
.PP
The copy command will be:
.IP
.nf
\f[C]
rclone copy --files-from files-from.txt / remote:backup
\f[R]
.fi
.PP
Then there will be an extra \f[V]home\f[R] directory on the remote:
.IP
.nf
\f[C]
/home/user1/42 → remote:backup/home/user1/42
/home/user1/dir/ford → remote:backup/home/user1/dir/ford
/home/user2/prefect → remote:backup/home/user2/prefect
\f[R]
.fi
.SS \f[V]--files-from-raw\f[R] - Read list of source-file names without any processing
.PP
This flag is the same as \f[V]--files-from\f[R] except that input is
read in a raw manner.
Lines with leading / trailing whitespace, and lines starting with
\f[V];\f[R] or \f[V]#\f[R] are read without any processing.
rclone lsf (https://rclone.org/commands/rclone_lsf/) has a compatible
format that can be used to export file lists from remotes for input to
\f[V]--files-from-raw\f[R].
.SS \f[V]--files-from0\f[R] - Read NUL separated list of source-file names
.PP
This flag is the same as \f[V]--files-from-raw\f[R] except that input is
split on NUL (\f[V]\[rs]0\f[R]) characters instead of newlines.
This allows handling filenames that contain embedded File truncated at 1 MB.