Rclone Sync Deleting Destination Folders

STOP and READ USE THIS TEMPLATE NO EXCEPTIONS - By not using this, you waste your time, our time and really hate puppies. Please remove these two lines and that will confirm you have read them.

What is the problem you are having with rclone?

I'm using rclone sync rc apis to sync Aws s3 to local windows directory. Ex:- rclone sync s3bukcetname/directory1 destinationDirectory1.
If source (directory1) doesn't exist, then rclone is deleting everything from destination (destinationDirectory1).
Is there a way to handle this ?
I would ideally want rclone to handle path that doesnt exist.

Run the command 'rclone version' and share the full output of the command.

rclone v1.61.1

  • os/version: Microsoft Windows 10 Enterprise 22H2 (64 bit)
  • os/kernel: 10.0.19045.3086 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.19.4
  • go/linking: static
  • go/tags: cmount

Which cloud storage system are you using? (eg Google Drive)

AWS

The command you were trying to run (eg rclone copy /tmp remote:tmp)

Paste command here

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag

Paste  log here

When you chose to use sync you want make source and destination the same so deleting from destination not existing in source content is correct behaviour.

I think what you want is just to use rclone copy

As per sync documentation:

Destination is updated to match source, including deleting files if necessary (except duplicate objects, see below). If you don't want to delete files from destination, use the copy command instead.

no, I want to use sync.
but can rclone handle source that doesn't exist ? instead of deleting everything on destination ?

You want to use sync which behaves like copy....

You do not want to sync source to destination (it includes deleting things). You want to copy source to destination - leaving whatever is only at destination intact.

Not with sync. Documentation is very clear how sync works. This is what copy does:)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.