Amanda-Users

A script to test GNU tar exclude patterns

2006-07-18 02:32:27
Subject: A script to test GNU tar exclude patterns
From: Olivier Nicole <on AT cs.ait.ac DOT th>
To: amanda-users AT amanda DOT org
Date: Tue, 18 Jul 2006 13:23:49 +0700 (ICT)
Hi,

I have put together the following srcipt
http://www.cs.ait.ac.th/~on/testgtar to help testing exclude patterns
in GNU tar.

This is a simple Perl script, that should run on any installation; but
I'd like to receive comments about the way I could improve it (this
not working being first candidate for improvement :)

Best regards,

Olivier


########################################################################
#
# Script to test how GNU tar will deal with exclusion in Amanda.
#                                       Olivier Nicole - AIT - July 2006
#
# Configuration : you must edit the variable $gtar bellow and set it
# to the full pathname of the GNU tar program used by your
# configuration of Amanda. That should be a valid GNU tar program,
# other version of tar could give unexpected results.
#
# Usage: testgtar <exclude_file> <directory>
#
# Test the exclude patterns contained in the file <exclude_file> on the
# directory <directory>.
#
# The script will try to guess the version of tar in use. GNU tar will
# be detected as broken if a pattern of the form ./foo excludes a file
# that is not at the top of the hierachy being tared.
#
# Performance: this scripts makes several call to GNU tar:
#  - one call to guess if GNU tar is broken
#  - two calls for each exclude pattern (with and without exclude)
# so it is quite GNU tar intensive. On a dual Xeon 3.0 it runs in 30
# seconds for 2 patterns on a 27 GB directory.
#
########################################################################