This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

What is a correct exclude list ?

Synchronize files & directories to/from XigmaNAS with minimal data transfer.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
gabier
Starter
Starter
Posts: 23
Joined: 08 Dec 2014 16:41
Status: Offline

What is a correct exclude list ?

Post by gabier »

Hello!

I whish to use the RSYNC's option --exclude-from= and give a list of excluded directories. I have tried it different ways and it does not work. I think it is a format problem; I have found examples on the net but I am not sure if it is the same in FreeBSD.
I know this is a newbie question but if somebody has used it, it will be quicker than to guess and try all possible variations.
1. Should the "--exclude-from" string be followed by an "=" sign (I have seen examples without it) ?
2. Should the name of the list be between quotes "--exclude-from=list.txt" or "--exclude-from='list.txt' " ?
3. Should the name of the list be given by full path or relative to the source top directory ?
4. In the list should each of the lines be between quotes (if yes should the leading + or minus sign be also between quotes ?
5. in the list, is each line/exclusion relative to the top directory of source or full path ?

Thanks

:) gabier
Dell 8300 computer with NAS4Free 10.2.0.2- RAID1 2TB
Dell 8900 Desktop (Windows 10) Cygwin 2.3.0

gabier
Starter
Starter
Posts: 23
Joined: 08 Dec 2014 16:41
Status: Offline

Re: What is a correct exclude list ?

Post by gabier »

As I am not patient, or certainly not enough, I just spent 2 hours building a simple example of rsync with a few little directories, and changing the rsync options until the exclusion works.
Here are my findings (they come from my example which works, maybe there are other valid syntaxes)

1. Should the "--exclude-from" string be followed by an "=" sign (I have seen examples without it) ? NO (or at least NOT MANDATORY)
2. Should the name of the list be between quotes "--exclude-from=list.txt" or "--exclude-from='list.txt' " ? YES
3. Should the name of the list be given by full path or relative to the source top directory ? Full path relative to the home directory
4. In the list should each of the lines be between quotes (if yes should the leading + or minus sign be also between quotes ? NO
5. in the list, is each line/exclusion relative to the top directory of source or full path ? TO BOTTOM DIRECTORY OF SOURCE PATH

I add: if you want to exclude a directory and its content, you should write DIR/ and not /DIR/

I hope this can help.

:) gabier
Dell 8300 computer with NAS4Free 10.2.0.2- RAID1 2TB
Dell 8900 Desktop (Windows 10) Cygwin 2.3.0

Post Reply

Return to “RSYNC”