rsync task auxiliary parameters syntax

iVhksqJjo

Dabbler
Joined
Jan 27, 2023
Messages
17
I'm trying to make an rsync task that only syncs folders with "-config" and all their subdirectories and files, and so I input the necessary parameters into the "Auxiliary Parameters" fields on the rsync task.

For instance if I input:
--include '*-config/**'
that is seen as 2 different params because of the space.
So then I do double quotes around the entire statement:
"--include '*-config/**'"
But now the rsync task fails when run.

What syntax am I supposed to use to get my params to work?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
You can try reporting it as a bug but I'm not sure there's a good fix for this. rsync allows some very bizarre parameters and while your specific case should be fixable, I can imagine a number of slightly more complex ones that won't be.
 
Joined
Oct 22, 2019
Messages
3,641
What about if you try it like this:
--include='*-config/**'
 
Joined
Oct 22, 2019
Messages
3,641
Fails immediately, like the double quotes with the space preserved.
:frown:

Last idea I can think of:

--include=*-config/**

Quotes removed. (Maybe the GUI wraps parameters in quotes under the hood?)

Nevermind. I just read the tooltip.

Note: The "*" character must be escaped with a backslash (\\*.txt) or used inside single quotes ('*.txt').

I wonder if this will work then:
--include=\*-config/\*\*
 
Last edited:

iVhksqJjo

Dabbler
Joined
Jan 27, 2023
Messages
17
:frown:

Last idea I can think of:

--include=*-config/**

Quotes removed. (Maybe the GUI wraps parameters in quotes under the hood?)

Nevermind. I just read the tooltip.



I wonder if this will work then:
--include=\*-config/\*\*
When inputting your suggestion, saving and then opening the task again, this is what truenas has parsed it to:

rsync.png

However, it doesn't fail outright. The task runs, but nothing happens (ie. no data is transferred) :confused:
 
Joined
Oct 22, 2019
Messages
3,641
When inputting your suggestion, saving and then opening the task again, this is what truenas has parsed it to:
Screw it, let's try a hail mary then, if TrueNAS wants to play hardball.
--include='\*-config/\*\*'

Or the double-quote version (if the above doesn't work):
--include="\*-config/\*\*"
 
Last edited:

iVhksqJjo

Dabbler
Joined
Jan 27, 2023
Messages
17
Screw it, let's try a hail mary then, if TrueNAS wants to play hardball.
--include='\*-config/\*\*'

Or the double-quote version (if the above doesn't work):
--include="\*-config/\*\*"
The single quotes are parsed into double quotes automatically:
rsync.png

... But now it just fails immediately :frown:
 
Joined
Oct 22, 2019
Messages
3,641
Lately I've been frustrated with the lack of polish and practicality of using the GUI on this NAS "appliance". :confused:

Last idea I can think of before giving up:
--include-from=/path/to/file

Then just use an "include file" that contains the content:
Code:
*-config/**



EDIT: On second thought...
However, it doesn't fail outright. The task runs, but nothing happens (ie. no data is transferred) :confused:
...this might have "worked", but the pattern is incorrect?
 

iVhksqJjo

Dabbler
Joined
Jan 27, 2023
Messages
17
Lately I've been frustrated with the lack of polish and practicality of using the GUI on this NAS "appliance". :confused:

Last idea I can think of before giving up:
--include-from=/path/to/file

Then just use an "include file" that contains the content:
Code:
*-config/**



EDIT: On second thought...

...this might have "worked", but the pattern is incorrect?
My pattern is definetely poop, as it returns things I don't want, when I just the rsync command from the truenas terminal - but it is returning data, which I cannot get truenas to do through the gui, unless I target just 1 path and try to sync everything, without params.

I also tried just adding multiple paths into the remote path thinking I could just add a path for each of my -config folders:
/source/dir1-config/ /source/dir2-config/

... But that also fails despite the fact it works perfectly in the when I use rsync on those dirs in the cli
rsync -avz user@ip:'/source/dir1-config/ /source/dir2-config/' /destination
So it seems the rsync gui only accepts 1 path, which is really frustating...

So I guess I just have to make 20+ rsync tasks via the GUI, one for each of my dirN-config on the source until the functionality is made usable from the gui. Or alternatively put a script somewhere with all the dirs included that's executed on a cronjob, if I can't find a working pattern.
 
Last edited:

Richard Kellogg

Dabbler
Joined
Jul 30, 2015
Messages
27
I'm using truenas core 13.0, i had similar issue. The method for adding additional ‘rsync options’, is on the Auxiliary Parameters. However, after typing in a single option, you press “enter”. This puts the optional text inside a bubble. To add more options, you continue to add the option text, followed by another “enter” key. This adds a second bubble. And so on, for additional options.

It’s actually in the manual, but I hate how the gui keeps getting changed for arbitrary reasons, that just make for operator screw ups, with little to no value added.
 
Top