Wildcards for the UNIX/Linux File System Agent

You can use wildcard characters to define patterns for subclient content and filters. If the subclient content consists of wildcard characters and no eligible files are found for backup, then the backup operation will complete successfully even though no files were backed up.

The following table describes how to use wildcard characters when you define the subclient content or filters:

Wildcards

Description

Examples

<MR>.

<MR> followed by any extension would filter out the files with the same name as extension and not the folder

  • bak.bak

  • file_1.bak

    <MR>.bak would filter the files having the ".bak" extension and NOT the folder.

*

Matches any number of characters.

Used to match all objects.

This wildcard is used in the following scenarios:

  • Back up all files of a specific extension.

  • Back up all files under a specific directory.

  • Back up all files of a specific extension where the file name starts with a specific pattern.

*.doc backs up all files with the extension .doc (e.g., status.doc, mission.doc) on all partitions and paths on the client computer.

/Test/*.doc backs up all .doc files only in the /Test directory

a*.so backs up all files which start with "a" and with the extension .so (e.g., alsvc.so, advdcc.so) on the client computer.

/Finance/Test/* backs up only the files under the /Finance/Test directory. Any sub-directory under the Test directory is not backed up.

**

Matches any directory level.

/**/move.cpp - includes the file named move.cpp located at any directory level. (e.g., /root/newapp/move.cpp/opt/kde3/src/move.cpp)

/etc/** - includes all directories and files under /etc directory. All the sub-directories and files under these directories are included in the backup.

***

Matches any directory level.

/etc/*** includes all directories, sub-directories, and files under the /etc directory.

Note

This wildcard is recommended for filters only.

?

Matches any one character.

Used to match all files (or directories) for which any one character in the file name or the directory name is variable.

/access? backs up any directory or file on the client computer for which the name begins with- access followed by any one character such as access1 or access5. However, access12 or access15 are not backed up because the last two characters in the name are variables. To back up access12 or access15, you must specify access?? in the subclient content.

Class?report backs up any directory or file for which the wildcard character in the place of ? is a variable. For example: Class1report and Class2report are included in the backup. However, Class15report is excluded from backup.

[]

Matches a set or range of characters enclosed in square brackets.

Numbers within square brackets are treated as single digits, and a dash between two digits indicates the complete range of numbers between those two digits.
For example,
test[1-5].txt backs up all files test1.txt through test5.txt.
test1[0-9][0-9][0-9].txt backs up all files starting from test1000.txt to test1999.txt.
test[1-3][0-9] backs up files test 10 through test 39; test[10-39] backs up test0, test1, test2, test3, and test9.
test[A-Ea-e].txt backs up all upper case and lower case files testA.txt through testE.txt, and testa.txt through teste.txt.
test[A-Ea-e6-9].txt backs up all upper case and lower case files testA.txt through testE.txt and testa.txt through teste.txt, and test6.txt through test9.txt.

[!]

Matches any single character that is not in the listed set or range of characters. You can use the wildcard in the following scenario:

Back up all files in a directory except the files for which the name starts with any character from the specified set or range of characters.

/root/[!AEIOU]*.doc backs up all .doc files in the /root directory that start with a letter other than A, E, I, O, or U.

When you use wildcards to specify the subclient content, the content path appears in Italics.

If you want all the files with the file extension ".doc" to be backed up from any level, then specify the content as *.doc. If any subclient content does not start with /, then /**/ will be prefixed to the content to match at any level. For example, *.doc will be /**/*.doc.

To treat *, ?, [ ] as literals in the subclient content and not as wildcards, you can escape the wildcard by adding ‘\’ before the wildcard. For example, /Report\[2011-2012\]/*.doc backups all the .doc files under /Report[2011-2012].

More than one type of wildcard can be used when specifying subclient content (e.g., /Dcvol?/oracle[1-47]/**/*.log).

Loading...