dumpnet.cleanupPolicy - apply a cleanup policy
dumpnet.cleanupPolicy DIR POLICY [EXCLUDE_FILE]
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.
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
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.
$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
dumpnet(8)
Lukas Feiler <lukas.feiler@lukasfeiler.com>
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.