SirMaster
(Nicholas Oldroyd)
February 24, 2017, 8:54pm
1
Hi, I have a file tree that essentially looks like this:
I’m able to use the filter --exclude “Chuck/**”
And it excludes the folder Chuck and all subfolders and subfiles successfully which is what I want.
But I will be adding a lot of rules and need to use the exclude-from file.
So I made a excludetv.txt file and put a single line of the exact same pattern in the file: “Chuck/**”
Then I use --exclude-from /root/rclone/excludetv.txt to my command and it doesn’t work at all, nothing gets excluded.
Any ideas?
Stokkes
February 24, 2017, 9:52pm
2
Search is your friend :
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 …
This should be the correct syntax provided the path to .foobar is /my/dir/.foobar
rclone sync /my/dir remote:/my/remote/dir --exclude "/.foobar/**"
Test using rclone ls
rclone ls /my/dir --exclude "/.foobar/**"
Eg
$ rclone ls .
5 one
0 .potato/two
$ rclone ls . --exclude "/.potato/**"
5 one
Basically, if you’re syncing TV Shows, you need to do something like --exclude="/Chuck/**"
SirMaster
(Nicholas Oldroyd)
February 24, 2017, 9:59pm
3
I don’t think you read my post…
I have --exclude working just fine.
What is not working is when i put the exclude pattern in a file and use --exclude-from. It no longer works…
Stokkes
February 24, 2017, 10:02pm
4
Sorry, can you post your file?
Or at least a subset of your file?
SirMaster
(Nicholas Oldroyd)
February 24, 2017, 10:05pm
5
I provided all that in my original post.
My exclude file has a single line: “Chuck/**”
The exact same string pattern that works if i use --exclude
I’ll add more lines to my file after i can at least get it to work with 1 pattern.
Stokkes
February 24, 2017, 11:53pm
6
Can you try adding a forward slash /
to see if it makes a difference?
SirMaster
(Nicholas Oldroyd)
February 25, 2017, 12:48am
7
Tried “/Chuck/**” still no luck.
Stokkes
February 25, 2017, 1:09am
8
I’m reading this page: http://rclone.org/filtering/
And the example provided does not include quotes in the string. Maybe try that?
I just tried it and it works here (but I’m on linux)
Chuck
Season 1
Season 2
Season 3
Season 4
Season 5
poster.jpg
fanart.jpg
my exclude.txt file:
# Exclude file
/Season 1/**
/Season 2/**
/Season 3/**
/Season 4/**
/Season 5/**
And the command that worked for me:
rclone sync acdcrypt:tvshows/Chuck ~/tmp/Chuck -v --exclude-from ./exclude.txt
Only fanart.jpg and poster.jpg were present in ~/tmp/Chuck
SirMaster
(Nicholas Oldroyd)
February 25, 2017, 1:36am
9
How can I put Season 1, etc in my exclude file. I only want to exclude specific shows.
I’ll remove the quotes, but remember, it works if i use --exclude, just not when i put the exact same string in a file.
Stokkes
February 25, 2017, 1:40am
10
The example I provided was just an example
Your exclude file would be like so:
# Exclude file
/Chuck/**
/Show 2/**
/Show 3/**
and then you could do (like my example)
rclone sync acdcrypt:tvshows/ ~/tmp --exclude-from ./exclude.txt
Stokkes
February 25, 2017, 1:41am
11
To answer your question, I’m thinking the exclude file can’t include quotes. The quotes are used on the command line due to bash/other shells and ensuring you’re encapsulating the text correctly.
The file may not have that limitation if rclone is pulling it in directly. In fact, the quotes in the file may confuse it if it’s not expecting it.
SirMaster
(Nicholas Oldroyd)
February 25, 2017, 3:40am
12
Yeah, thanks Stokkes.
You are right about the quotes. It’s working now from the file with multiple shows. Even shows with spaces in the name are working as long as I don’t use quotes at all.
I figured I was just doing something simple wrong.