Wildcards in NetBackup

NetBackup recognizes the following wildcard characters in areas where wildcards can be used. (For example, paths in the backup selections list and exclude file lists.)

Table: Wildcard use in NetBackup shows the wildcards that can be used in various NetBackup dialog boxes and lists.

Table: Wildcard use in NetBackup

Wildcard

Use

*

Serve as a wildcard for zero or more characters.

An asterisk can be used in the backup selection list, the include list, and the exclude list for Windows, UNIX, and Exchange clients.

For example:

r* refers to all files that begin with r

r*.doc refers to all files that begin with r and end with .doc.

To back up all files that end in .conf, specify:

/etc/*.conf

?

Serves as a wildcard for any single character (A through Z; 0 through 9).

A question mark can be used in the backup selection list, the include list, and the exclude list for Windows, UNIX, and Exchange clients.

For example:

file? refers to file2, file3, file4

file?? refers to file12, file28, file89

To back up all files named log01_03, log02_03, specify:

c:\system\log??_03

[ ]

Use a pair of square brackets to indicate any single character or range of characters that are separated with a dash.

Square brackets can be used in the backup selection list, the include list, and the exclude list for Windows, UNIX, and Exchange clients.

For example:

file[2-4] refers to file2, file3, and file4

file[24] refers to file2, file4

*[2-4] refers to file2, file3, file4, name2, name3, name4

{ }

Curly brackets can be used in the backup selection list, the include list, and the exclude list for UNIX clients only.

Use a pair of curly brackets (or braces) to indicate multiple file name patterns. Separate the patterns by commas only; no spaces are permitted. A match is made for any or all entries.

For example:

{*1.doc,*.pdf} refers to file1.doc, file1.pdf, file2.pdf

Note:

Curly brackets are valid characters for Windows file names and cannot be used as wildcards on Windows platforms. Backslashes cannot be used as escape characters for curly bracket characters.

To use wildcard characters literally, precede the character with a backslash (\).

A backslash (\) acts as an escape character only when it precedes a special or a wildcard character. NetBackup normally interprets a backslash literally because a backslash is a legal character to use in paths.

Assume the brackets in the following are to be used literally:

C:\abc\fun[ny]name

In the exclude list, precede the brackets with a backslash:

C:\abc\fun\[ny\]name