What's the syntax to exclude ONE folder from rsync in "extra options"

Status
Not open for further replies.

Cephyid

Dabbler
Joined
Dec 2, 2015
Messages
29
I'm using rsync to test backing a dataset from one volume to another in the same machine. Rather than create a second dataset for one folder in there that I want backed up separately somewhere else though I just want to exclude it, and only it.

Been testing and have tried every syntax except the correct one.

1. I want to PUSH everything from /mnt/data_volume/123/backup test folder

EXCLUDING the folder called EXCLUSIONS

For example in "extra options" of the PUSH I put this

--exclude=/exclusions/

2. I'm PULLING to /mnt/data_backup

3. I created a rsync module with the path: /mnt/data_volume/123/backup test folder

Since I'm doing this on one machine my remote host is localhost in both PUSH and PULL and I'm not having any problems moving all the data. I had some nesting folder issues but solved that.

Am I supposed to have any syntax in the PULL? What am I missing?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
No, that backslash allows the use of a space in the folder name.

Actually it doesn't work for me...
I tried adding in my include command:

+ AppData
+ AppData/Roaming
+ AppData/Roaming/Apple\ Computer

but the "Apple Computer" folder is not copied! even if trying to move the backslash...
Any ideas?
 

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
Actually it doesn't work for me...
I tried adding in my include command:

+ AppData
+ AppData/Roaming
+ AppData/Roaming/Apple\ Computer

but the "Apple Computer" folder is not copied! even if trying to move the backslash...
Any ideas?

I've tried all the suggested methods i found on the net (adding \,'," etc...) but none of them worked for me, so at the end the only available solution was to add the "-s, --protect-args" option in the extra option field.
Hope this would be helpful for someone
 
Status
Not open for further replies.
Top