NAME

dumpnet.cleanupPolicy - apply a cleanup policy


SYNOPSIS

dumpnet.cleanupPolicy DIR POLICY [EXCLUDE_FILE]


DESCRIPTION

dumpnet.cleanupPolicy will list all files that should be deleted in DIR according to POLICY. It will extract the the policy element names and their arguments from POLICY. For each policy element name dumpnet.cleanupPolicy.POLICY_ELEMENT_NAME will be called with the arguments specified. Please see dumpnet(8) for details. For the policy keepAllSinceLev0_2,keepYearly_lev0 it would call:

 - dumpnet.cleanupPolicy.keepAllSinceLev0 2
 - dumpnet.cleanupPolicy.keepYearly lev0

This results in a list of grep patterns for files to keep. All files not matching one of these patterns will be cleaned up. Please note that only files matching SID* will be considered for cleanup. Files containing the string ``MASTER'' or ``MODIFED'' will always be kept.


OPTIONS

DIR
The directory in which to apply the cleanup policy.

POLICY
The cleanup policy defined by one or more policy elements - please see dumpnet(8).

EXCLUDE_FILE
A file of grep patterns that match files that must not be deleted.


EXAMPLES

Apply the cleanup policy keepAllSinceLev0_2,keepYearly_lev0,keep_FAILED to /backup/example.com/usr/:

        dumpnet.cleanupPolicy /backup/example.com/usr/ keepAllSinceLev0_2,keepYearly_lev0,keep_FAILED


EXIT STATUS

dumpnet.cleanupPolicy will return 1 if DIR is not writable and owned by the effective UID or if one of the policy elements does not exist. In any other case it has a zero exit status.


FILES

 $DUMPNET_HOME/bin/dumpnet.cleanupPolicy
 $DUMPNET_HOME/bin/dumpnet.cleanupPolicy.keep
 $DUMPNET_HOME/bin/dumpnet.cleanupPolicy.keepAllSinceLev0
 $DUMPNET_HOME/bin/dumpnet.cleanupPolicy.keepDaily
 $DUMPNET_HOME/bin/dumpnet.cleanupPolicy.keepEssentialLevels
 $DUMPNET_HOME/bin/dumpnet.cleanupPolicy.keepFor
 $DUMPNET_HOME/bin/dumpnet.cleanupPolicy.keepLast
 $DUMPNET_HOME/bin/dumpnet.cleanupPolicy.keepMonthly
 $DUMPNET_HOME/bin/dumpnet.cleanupPolicy.keepWeekly
 $DUMPNET_HOME/bin/dumpnet.cleanupPolicy.keepYearly


SEE ALSO

 dumpnet(8)


AUTHOR

 Lukas Feiler <lukas.feiler@lukasfeiler.com>


COPYRIGHT AND LICENSE

dumpnet is published under the LGPL (GNU LESSER GENERAL PUBLIC LICENSE). Please see the LICENSE file contained in the installation tarball for details. The official web site is http://dumpnet.sourceforge.net.