| Aspera Sync | 250
Specifying Rules in a File
Rules can be specified in a text file, with each rule on a separate line.
• Rules in the file are applied to the file set as if from a series of --include A --exclude B options.
• Leading white spaces, blank lines and comment lines (# comment) are ignored.
• Rules default to include for --include-from or exclude for --exclude-from rules.
•
To force include in an --exclude-from file, start a line with + (plus and a space). For example, +
image* is equivalent to --include="image*".
•
To force exclude in an --include-from file, start a line with - (minus and a space). For example, -
image* is equivalent to --exclude="image*".
• A file or directory name that does not match any rule is still tracked, as if by a final "+ *" and "+ .*".
Note: To reliably exclude all unmatched files, add two final rules: "- *" and "- .*".
• Rules in files can point to other files:
•
To name a file to read for more rules, enter . FILE (dot-space-filepath). This syntax does not set a default
filter action (include or exclude). In this case, each line in the rule file must specify if it is an include or
exclude rule.
•
Lines that start with .+ (dot plus and space), such as .+ F, are equivalent to --include-from=F.
•
Lines that start with .- (dot minus and space), such as .+ G, are equivalent to --exclude-from=G.
Specifying Rules in aspera.conf
Rules can be specified in aspera.conf and applied to sessions run by a specific user or all users, as they are for
ascp sessions. Rules in aspera.conf are applied first, then any command line filters are applied.
CAUTION: Rules that are set in aspera.conf apply to both ascp and async sessions. If you do
not want async filtering rules to apply to ascp sessions, set the rules for a specific user and use that
user for async sessions. If you notice your async sessions are being filtered in unexpected ways,
search aspera.conf for <filters> to determine what rules have been configured. You can find
aspera.conf in the following location:
/opt/aspera/etc/aspera.conf
Rule Syntax
• To specify an inclusion, start the filter pattern with '+ ' (+ and a whitespace, such as + *.jpg).
• To specify an exclusion, start the filter pattern with '- ' (- and a whitespace, such as - *.png).
Set Filters in aspera.conf
To set filters for a specific user, run the following asconfigurator command:
# asconfigurator -x
"set_user_data;user_name,username;file_filters,|filter1[|filter2]"
To set filters for all users, run the following:
# asconfigurator -x "set_node_data;file_filters,|filter1[|filter2]"
The separator "|" is not required if only one filter is set.
Rule Patterns
Rules use standard globbing syntax and globbing extensions.
Standard Globbing Syntax
/ The only recognized path separator.