ArGest Backup User Guide

  1. Home
  2. Docs
  3. ArGest Backup User Guide
  4. Terminal File Inclusion and Exclusion
  5. Testing Include/Exclude Patterns

Testing Include/Exclude Patterns

Filter patterns may produce unexpected results, especially if several patterns are specified. It is wise to do a test before you attempt a backup. The following command will test which files will be extracted from an archive, and will write the pathnames selected to xtest.out using the extract pattern(s) specified in /etc/bruxpat (or the file named in the environment variable BRUXPAT). Test your parameters without doing an actual backup by using the following BRU command:

bru -evvvv -QX > ctest.out

Running BRU in -e mode will not perform an actual backup; instead it will print all the selected pathnames, in this case sending them to the file named ctest.out. If this file contains the pathnames you expect, then it is safe to do a backup with the -c option substituted for -e:

bru -cvvvv -QX

You can test patterns used for file extraction in a similar manner by using the -t option. The following command will test which files will be extracted from an archive, and will write the table of contents to xtest.out using the extract pattern(s) specified in /etc/bruxpat (or the file named in the environment variable BRUXPAT):

bru -tvvvv -QX > xtest.out

Again, if xtest.out contains the pathnames you expect, it is safe to restore files, substituting -x for -t:

bru -xvvvv –QX

NOTE: To use the combination of the –T along with the –QX options, refer to Chapter 10, “Extracting Files.”