Can't get --exclude to work

Hi,

Sorry for asking this but I’ve been banging my head against the wall for a few hours. I’m creating a nightly backup script to backup my Plex folder and want to exclude some folders but no matter what syntax I try, the folders I want to exclude always get copied over.

Here’s my command (using latest beta):
rclone sync /home/stokkes/appdata/plex acd:Backups/Apps/plex --exclude="transcode"

In the plex folder there is a transcode folder that I don’t want to sync. This folder keeps getting synced. I’ve also tried:

–exclude transcode
–exclude “transcode”
–exclude="/transcode"
–exclude=“transcode/”
–exclude="/transcode/**"
–exclude="/transcode/*"

Any ideas what I’m doing wrong?

Thanks!

I would say this one is correct.

Test using rclone ls /home/stokkes/appdata/plex --exclude="/transcode/**"

How does it work for you?

@ncw

Will try that… Would it be the same for deep folders, i.e.:

–exclude="/Library/Application Support/Plex Media Server/Logs/**" (note the spaces in folder names)

Thanks!

Yes that looks good. Note that the paths are a) relative to the root of the remote and b) in unix form not Windows form!

Hi,

Read the docs and a few posts bout this but I still cant get my --exclude to work :frowning:

Heres my script:

LOGFILE="/home/mike/Logs/rclone-upload.cron"
FROM="/home/mike/Pre/"
TO="ACD_Mike:/"
DONT="/home/mike/Pre/PreSeries/**"


/usr/sbin/rclone move "$FROM" "$TO" -c --no-traverse --transfers=300 --checkers=300 --delete-after --exclude="$DONT" --min-age 15m --bwlimit 25M --log-file="$LOGFILE"

I need to move all the /Pre/ except /PreSeries/. What am I missing?

The includes and excludes are relative to the root of the copy, so you want DONT="/PreSeries/**" I think.

… I don’t know why I didnt think about it. Thanks ncw! :slight_smile:

–exclude="/home/automation/downloads/rutorrent/completed/radarr/**"

This doesn’t worked for me, why?

The includes and excludes are relative to the root of the copy - what does your rclone command line look like?