rclone

From RaySoft

rclone is a command line program to manage files on cloud storage. It is a feature-rich alternative to cloud vendors' web storage interfaces. Over 40 cloud storage products support rclone including S3 object stores, business & consumer file storage services, as well as standard transfer protocols.[1]

rclone has powerful cloud equivalents to the unix commands rsync, cp, mv, mount, ls, ncdu, tree, rm, and cat. rclone's familiar syntax includes shell pipeline support, and --dry-run protection. It is used at the command line, in scripts or via its API.[1]

Documentation

Syntax

rclone SUBCOMMAND [PARAMETER ...] SRC DST

Subcommands

about
Get quota information from the remote, like bytes used/free/quota and bytes used in the trash.
NOTE:
Not supported by all remotes.
check
Checks the files in the source and destination match. It compares sizes and hashes (MD5 or SHA1) and logs a report of files which don’t match. It doesn’t alter the source or destination.
config
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.
cleanup
Clean up the remote if possible. Empty the trash or delete old file versions.
NOTE:
Not supported by all remotes.
link
Create, retrieve or remove a public link to the given file or folder.
sync
Sync the source to the destination, changing the destination only. Doesn’t transfer unchanged files, testing by size and modification time or MD5SUM. Destination is updated to match source, including deleting files if necessary.

Parameters

--auto-confirm
If enabled, do not request console confirmation.
--backup-dir=DIR
Make backups into hierarchy based in DIR.
--buffer-size=NUMBER
Buffer size when copying files (default 16 MB).
--checkers=NUMBER
NUMBER of checkers to run in parallel (default 8).
--crypt-show-mapping
For all files listed show how the names encrypt.
--delete-during
When synchronizing, delete files during transfer.
--exclude-from=FILE
Read exclude patterns from FILE.
--fast-list
Use recursive list if available. Uses more memory but fewer transactions.
--log-file=FILE
Log everything to this FILE.
-n, --dry-run
Do a trial run with no permanent changes.
-P, --progress
Show progress during transfer.
--skip-links
Don't warn about skipped symlinks.
--track-renames
When synchronizing, track file renames and do a server side move if possible.
--transfers=NUMBER
NUMBER of file transfers to run in parallel (default 4).
-u, --update
Skip files that are newer on the destination.
--use-server-modtime
Use server modified time instead of object metadata.
-v, --verbose
Print lots more stuff (repeat for more).

for Amazon S3

and compatible services e.g. Wasabi

--s3-chunk-size=NUMBER
Chunk size to use for uploading (default 5 MB).

for Backblaze B2

--b2-chunk-size=NUMBER
Upload chunk size. Must fit in memory (default 96 MB).
--b2-hard-delete
Permanently delete files on remote removal, otherwise hide files.
--b2-upload-cutoff=NUMBER
Cutoff for switching to chunked upload (default 190.735 MB).

for Google Drive

--drive-chunk-size=NUMBER
Upload chunk size. Must a power of 2 >= 256 kB (default 8 MB).
--drive-skip-gdocs
Skip google documents in all listings.
--drive-upload-cutoff=NUMBER
Cutoff for switching to chunked upload (default 8 MB).
-drive-use-trash=BOOLEAN
Send files to the trash instead of deleting permanently (default true).

Examples

Sync files to Google Drive
rclone about 'gdrive:'

rclone sync \
  --delete-during \
  --drive-skip-gdocs \
  --drive-use-trash='false' \
  --exclude-from="${HOME}/etc/pictures.exclude" \
  --progress \
  --verbose \
  "${HOME}/Pictures" 'gdrive:'

rclone cleanup 'gdrive:'

rclone about 'gdrive:'

References