.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "CLEANARCH 1" .TH CLEANARCH 1 2023-07-29 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME cleanarch \- Clean a DNSSEC\-Tools key archive of old keys .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& cleanarch [options] .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBcleanarch\fR deletes old keys from a DNSSEC-Tools key archive. Key "age" and archives are determined by options and arguments. .PP Command line options and arguments allow selection of archives, keys to delete, amount of output to provide. The options are divided into three groups: archive selection, key selection, and output format. Complete information on options is provided in the OPTIONS section. .PP \&\fBcleanarch\fR takes a single argument (as distinguished from an option.) This argument may be either a \fIkeyrec\fR file or a \fIrollrec\fR file. If the file is a \fIkeyrec\fR file, the archive directory for its zone \fIkeyrec\fRs are added to the list of archives to clean. If the file is a \fIrollrec\fR file, \fIkeyrec\fR files for its zones are searched for the zones' archive directory, and those directories are added to the list of archives to clean. If a zone does not have an archive directory explicitly defined, then the DNSSEC-Tools default will be cleaned. The archives specified by this argument may be modified by archive-selection options. .PP The archive-selection options combine with the \fIkeyrec\fR or \fIrollrec\fR file to select a set of archive directories to clean. (Some options can take the place of the file argument.) .PP The key-selection options allow the set of keys to be deleted to contain an entire archive, a particular zone's keys, or all the keys prior to a certain date. .PP The output-format options sets how much output will be given. Without any options selected, the names of keys will be printed as they are deleted. If the \fB\-verbose\fR option is given, then the directories selected for searching and the keys selected for deletion will be printed. If the \fB\-dirlist\fR option is given, then the directories selected for searching will be printed and no other action will be taken. If the \fB\-list\fR option is given, then the keys selected for deletion will be printed and no other action will be taken. .PP \&\fBcleanarch\fR only cleans the archive directories; the \fIkeyrec\fR files are left intact. The \fBcleankrf\fR command should be used in conjunction with \&\fBcleanarch\fR in order to have a consistent environment. .SH OPTIONS .IX Header "OPTIONS" .SS "Archive-Selection Options" .IX Subsection "Archive-Selection Options" The following options allow the user to select the archives to be cleaned. .IP "\fB\-archive directory\fR" 4 .IX Item "-archive directory" This option specifies an archive directory to be cleaned. .IP \fB\-defarch\fR 4 .IX Item "-defarch" This option indicates that the default archive directory (named in the DNSSEC-Tools configuration file) should be cleaned. .IP "\fB\-zone zone\fR" 4 .IX Item "-zone zone" This option indicates that \fIzone\fR is the only zone whose archive will be cleaned. If the archive directory is shared by other zones then their keys may also be deleted. .SS "Key-Selection Options" .IX Subsection "Key-Selection Options" The following options allow the user to select the keys to be deleted. .IP \fB\-all\fR 4 .IX Item "-all" Deletes all keys in the selected archives. This option may not be used with any other key-selection options. .IP "\fB\-days days\fR" 4 .IX Item "-days days" Deletes all keys except those whose modification date is within the \&\fIdays\fR full days preceding the current day. .IP "\fB\-onezone zone\fR" 4 .IX Item "-onezone zone" Only keys with \fIzone\fR in the key's filename are deleted. This is intended for use in cleaning a multi-zone key archive. .Sp This does not validate that \fIzone\fR is an actual zone. \fBAny\fR string can be used here. For example, using "private" will select old private key files for deletion and using "com" will select any filename that contains "com". .SS "Options for Output Control" .IX Subsection "Options for Output Control" The following options allow the user to control \fBcleanarch\fR's output. .IP \fB\-dirlist\fR 4 .IX Item "-dirlist" This option lists the selected archive directories. No other action is taken. .IP \fB\-list\fR 4 .IX Item "-list" This option lists the selected keys. No other action is taken. .IP \fB\-quiet\fR 4 .IX Item "-quiet" Display no output. .IP \fB\-verbose\fR 4 .IX Item "-verbose" Display verbose output. .IP \fB\-Version\fR 4 .IX Item "-Version" Displays the version information for \fBcleanarch\fR and the DNSSEC-Tools package. .IP \fB\-help\fR 4 .IX Item "-help" Display a usage message and exit. .SH WARNINGS .IX Header "WARNINGS" The user is advised to invest a bit of time testing this tool \fBprior\fR to putting it into production use. Once a key is deleted, it is \fBgone\fR. Some may find this to be detrimental to the health of their DNSSEC-Tools installation. .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright 2007\-2014 SPARTA, Inc. All rights reserved. See the COPYING file included with the DNSSEC-Tools package for details. .SH AUTHOR .IX Header "AUTHOR" Wayne Morrison, tewok@tislabs.com .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBcleankrf\|(8)\fR, \&\fBlskrf\|(8)\fR, \&\fBzonesigner\|(8)\fR .PP \&\fBNet::DNS::SEC::Tools::keyrec.pm\|(3)\fR, \&\fBNet::DNS::SEC::Tools::rollrec.pm\|(3)\fR .PP \&\fBdnssec\-tools.conf\|(5)\fR, \&\fBkeyrec.pm\|(5)\fR, \&\fBrollrec.pm\|(5)\fR