Home / Alt manpages / rclone(1)

  • rclone(1)
  • User command
  • linux

Copy Files to the Cloud Safely with rclone

rclone will sync, move or delete your data exactly as fast whether you meant it or not, so rehearsing first is the whole game. This builds a small, repeatable workflow: configure a named remote, list its contents, rehearse a transfer, copy without removing destination files, and verify the result, in about 20 minutes plus your provider's login time.

  • You need: a shell, an account with access to the storage, and a local directory you're willing to copy. No command here needs sudo; elevated privileges don't make cloud authentication safer or more correct.

The examples use the rclone command installed on this machine, package version 1.60.1+dfsg-3ubuntu0.24.04.6+esm1, reporting rclone v1.60.1-DEV.

Safety boundary

sync, move, delete and purge can remove data. Start with copy --dry-run. Keep a second copy of anything valuable until you've inspected the proposed changes.

1. Confirm the installed command

Check the binary and version before trusting any example here. This is read-only:

$ command -v rclone
/usr/bin/rclone
$ rclone version
rclone v1.60.1-DEV
...

Build details may differ on another host. The local manpage describes this installation and uses ~/.config/rclone/rclone.conf as the default configuration path. Confirm the path rclone will actually use:

$ rclone config file
Configuration file is stored at:
/home/your-user/.config/rclone/rclone.conf

Checkpoint

If the command is missing, install rclone through your distribution's documented package source. Don't copy a configuration file from an untrusted machine.

2. Create one named remote

Run the interactive configuration command as your ordinary user:

$ rclone config
  • Choose n to create a new remote, give it a short name such as backup, and select the storage provider from the installed prompt.
  • Follow the provider's own login flow. Some open a browser; others ask for a token or a service-account detail. Never paste secrets into a shell history or a command example.

The result is a named path. In later commands, backup:photos means the photos path on the remote called backup, and a bare backup: refers to the remote root. Names are local labels, not provider usernames.

Checkpoint

List configured remote names without displaying decrypted credentials:

$ rclone listremotes
backup:

To change or remove a remote, use rclone config and copy the configuration file first: it holds authentication material, so protect it with normal user-file permissions and never publish it. The config wizard can also set a password on the file itself.

3. Inspect the destination before writing

List a remote path before copying into it. lsd lists directories and doesn't recurse by default:

$ rclone lsd backup:photos
          -1 2026-09-26 18:00:00        12 camera

Dates and sizes above are just the shape of the output, not values to expect. For a machine-readable inventory use lsjson; for a quick human-readable recursive listing use ls, but remember ls recurses by default. Add --max-depth 1 for just the first level.

Checkpoint

Make sure the remote name and destination prefix are exactly right. A typo can create a new remote-side directory instead of the backup you intended.

4. Rehearse a copy with no changes

Suppose the local source is /srv/photos. Ask rclone what it would transfer before it transfers anything:

$ rclone copy --dry-run /srv/photos backup:photos
2026/09/26 18:00:00 NOTICE: holiday.jpg: Skipped copy as --dry-run is set (size 4.2Mi)
2026/09/26 18:00:00 NOTICE:
Transferred:            1 / 1, 100%

With --dry-run, rclone walks through the whole operation without copying or deleting anything. Output depends on your files and backend: look for unexpected paths, a reversed source and destination, or a destination outside the intended remote. Repeat the dry run every time you change filters or flags.

While learning, --interactive or -i is another guard the manpage recommends. It asks before operations, but it's not a substitute for actually checking the paths. --progress or -P shows transfer statistics; it doesn't make an operation reversible.

5. Copy without deleting destination files

Once the dry run looks right, use copy for an additive backup:

$ rclone copy --progress /srv/photos backup:photos

copy transfers new or changed files and never deletes anything already at the destination. Rclone copies the contents of a directory, not an extra directory level, so /srv/photos places its contents below backup:photos rather than creating backup:photos/photos.

To limit a scheduled run to recent files, use a duration:

$ rclone copy --dry-run --max-age 24h /srv/photos backup:photos

Read that dry-run output carefully: a time filter can quietly skip older files you expected it to protect.

6. Verify both sides

After a copy, compare source and destination:

$ rclone check /srv/photos backup:photos
2026/09/26 18:02:00 NOTICE: Local file system at /srv/photos: 12 matching files
2026/09/26 18:02:00 NOTICE: S3 bucket backup:photos: 12 matching files

A successful check reports matching files and exits successfully, though the exact wording and counts vary. By default check compares sizes and hashes where available and doesn't alter either side. Use --download when you specifically need content downloaded and checked, accepting the bandwidth cost, and --one-way only when extra destination files should be ignored, since it won't detect those extras.

If the check reports a file missing on the destination, inspect authentication, filters, path spelling and the transfer log before retrying. Don't jump straight to sync.

7. Treat sync as a deletion operation

Use sync only when the destination really must become identical to the source:

$ rclone sync --dry-run /srv/photos backup:photos

The dry run is the checkpoint. Every destination-only file it shows for deletion needs to be accounted for. If the proposed changes are correct, run the same command without --dry-run:

$ rclone sync --progress /srv/photos backup:photos

Warning

There is no general undo for a remote deletion. For a recovery path, use a separate destination or a provider feature such as versioning or trash where it's available. Rclone also supports --backup-dir REMOTE:PATH to keep replaced or removed destination files in a backup hierarchy, but test that policy with a dry run and check the provider's storage costs before relying on it.

The global --max-delete option can cap deletions during synchronisation. Treat it as a second safety net, not permission to skip the dry run. Don't use --force to bypass a safety check unless you've reviewed the whole change set and have recovery covered.

Done means

  • Version and config recorded: the installed rclone version and configuration path.
  • Remote created and listed: without exposing its credentials, source and destination order confirmed.
  • Dry run clean: a dry-run copy showed only the files you expected.
  • Right command used: copy when destination-only files had to be preserved.
  • Transfer verified: rclone check confirmed it, or any differences are understood.
  • Every destructive run rehearsed: sync, move or delete, always dry-run first.