Regex Exclude problem can't nest '{' '}' in glob

What is the problem you are having with rclone?

I am using rclone to sync to Google Drive
I am syncing wordpress websites and want to exclude all thumbnails as it's unneccesary to back those up
I have tried many different solutions to adding this regex into my filters.txt file which I then add to my command line using --exclude-from filters.txt

My current filters.txt looks as follows

- *.webp
- *-{{[0-9]+x[0-9]+\.jpg}}

So essentially I want all files ending in -[NUM]x[NUM].jpg to be excluded from syncing

Any assistance would be most appreciated

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)

Google Drive

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

rclone sync /usr/local/lsws/websites/thiswebsite/ googledrive:_SERVER_BACKUPS/websites/thiswebsite/ --ignore-existing --progress --filter-from filterwebs.txt

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

does not work

A log from the command that you were trying to run with the -vv flag

2025/03/16 08:19:01 Failed to load filters: can't nest '{' '}' in glob "*-{{[0-9]+x[0-9]+\\.jpg}}"

You are using an ancient version of rclone, from 2019. That is why. The regex feature was added in version 1.58. You should really install latest version, see the Install documentation for instructions. In future you can use the selfupdate command to keep up-to-date (it was added in version 1.55 so you need to get past that by other means before you can use it).

1 Like

I was just about to come and update this to solved. Thanks @albertony yes indeed the package version in the Ubuntu repositories is horribly out of date. I downloaded the latest .deb installed it and now working like a charm.