* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * Contact information: Zmanda Inc., 505 N Mathlida Ave, Suite 120
- * Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
+ * Contact information: Zmanda Inc., 465 S Mathlida Ave, Suite 300
+ * Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
*/
%module "Amanda::Logfile"
%include "amglue/amglue.swg"
%include "exception.i"
+%include "amglue/dumpspecs.swg"
+%import "Amanda/Cmdline.swg"
%{
#include <glib.h>
=head1 SYNOPSIS
- use Amanda::Logfile qw(:logtype_t); # XXX change
+ use Amanda::Logfile qw(:logtype_t);
use Amanda::Config qw( :getconf config_dir_relative );
for my $logfile (Amanda::Logfile::find_log()) {
}
Amanda::Logfile::close_logfile($log);
- my @dumps = Amanda::Logfile::search_logfile("TapeLabel-001", "19780615", $logfile);
+ my @dumps = Amanda::Logfile::search_logfile("TapeLabel-001", "19780615", $logfile, 1);
my @matching = Amanda::Logfile::dumps_match([@dumps], "myhost", "/usr", undef, undef, 0);
for my $dump (@matching) {
=over
-=item C<$timestamp>
+=item C<timestamp>
-=item C<$hostname>
+=item C<hostname>
-=item C<$diskname>
+=item C<diskname>
-=item C<$level>
+=item C<level>
-=item C<$label>
+=item C<label>
-=item C<$filenum>
+=item C<filenum>
-=item C<$status>
+=item C<status>
-=item C<$partnum>
+=item C<partnum>
+
+=item C<sec>
+
+=item C<kb>
=back
+Note that the format for these variables are based on that found in the
+logfiles. In particular, C<partnum> is a string, usually with a slash (C</>)
+in it. Also, C<timestamp> is the timestamp for the run in which the client
+dump took place, and not for the timestamp of the logfile.
+
=head1 HIGHER-LEVEL FUNCTIONS
Functions in this section extract information from logfiles.
All of these functions can be imported by name.
+=back
+
=cut
%}
off_t filenum;
char *status;
char *partnum;
+ double sec;
+ size_t kb;
%mutable;
} find_result_t;
find_result_t *dumps_match(find_result_t *output_find, char *hostname,
char *diskname, char *datestamp, char *level, int ok);
+
+find_result_t *dumps_match_dumpspecs(find_result_t *output_find,
+ amglue_dumpspec_list *dumpspecs,
+ gboolean ok);