ArGest Backup User Guide

  1. Home
  2. Docs
  3. ArGest Backup User Guide
  4. Terminal File Inclusion and Exclusion
  5. The bruxpat File and the – QX Option

The bruxpat File and the – QX Option

In addition to the standard BRU options for selecting files-by date, user, or owner – BRU lets you include or exclude files by name. This feature is enabled with the -QX (uppercase QX) option. The -QX option can be used when you are creating an archive (-c mode) or extracting files from an archive (-x mode). Additionally, the bruxpat file is used when using BRU’s software compression to exclude specified file types from the compression pass.

When you include the -QX option on the BRU command line, BRU will apply include/exclude patterns specified in the /etc/bruxpat file (the default pattern file). In BRU LE, the path to the bruxpat file is /var/lib/bru/etc/bruxpatcode>. The filenames encountered by BRU as it does a backup (or restore) will be compared to the patterns. If a filename matches any of the exclude patterns, it will not be backed up (or restored). Normally patterns will be read from the /etc/bruxpat file. BRU will use patterns from a different file if the environment variable BRUXPAT is set to the name of the new file. For example:

export BRUXPAT

The bruxpat file is also used to disable compression on certain files (-Z option). If many of your files are already compressed, you can enter a line in the bruxpat file that tells BRU not to compress files whose names indicate that they are already compressed. You may, for example, want to disable compression for files with filenames that end in “.Z” or “.z” or MP3 files (which are already highly compressed).

In addition to the use of the bruxpat file, BRU versions since 17.0 variant 1.4.0 now support the use of exclusion patterns from the command line. This is done using the -X (uppercase X) option followed by a shell pattern for exclusion:

bru -cvvf ntape0 -X “*/Caches/*” -X “*/*.tmp” /Users

That command would backup the /Users folder on your system while excluding any Caches folder contents and any files that end in “.tmp”. Note that the path must be included within quotes if it contains any form of wildcard or regular expression components.

For earlier version users, please make a note that the bruxpat option has changed from -X to -QX. This was done to allow simpler entries on the command line for one time exclusions. Please verify any pre-existing BRU scripts and change all instances of -X to