Force `sync` to delete files on remote despite of errors

What is the problem you are having with rclone?

When using rclone sync, files on the remote do not get deleted because the command has encountered errors (from the documentation: Note that files in the destination won't be deleted if there were any errors at any point). The errors are permission denied errors of files I don't need to upload anyway, and there are too many of these errors to exclude them manually. Can I force rclone to delete files on the remote somehow?

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

rclone v1.50.2

  • os/arch: linux/amd64
  • go version: go1.13.8

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

Backblaze B2

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

rclone sync /backups b2-crypt:/ -L --fast-list --transfers 16 --checkers 16 --exclude "/backups/home/[username]/.steam/**"

The rclone config contents with secrets removed.

type = b2
account = ***
key = ***
hard_delete = false
download_url = ***

type = crypt
remote = b2:***
filename_encryption = off
directory_name_encryption = false
password = ***

A log from the command with the -vv flag

I have a lot of files that I sync so the output is incredibly large. Most lines are just "Unchanged skipping" but some are error lines like:

2022/08/11 22:55:10 ERROR : home/[username]/.local/share/containers/storage/overlay/l/HLFPUF2GWSAACHYAFNJEM3XSND/var/lib/apt/lists/partial: failed to open directory "home/[username]/.local/share/containers/storage/overlay/l/HLFPUF2GWSAACHYAFNJEM3XSND/var/lib/apt/lists/partial": open /backups/home/brian/.local/share/containers/storage/overlay/l/HLFPUF2GWSAACHYAFNJEM3XSND/var/lib/apt/lists/partial: permission denied


2022/08/11 23:06:05 ERROR : certificates: error reading source directory: stat /backups/apache2/certificates/privkey.pem: permission denied

You can use:

      --ignore-errors                        Delete even if there are I/O errors


I feel so dumb right now that I didn't see that one in the list of flags....
Thanks a lot!

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