Amanda log files/Trace Logs: Difference between revisions

From wiki.zmanda.com
Jump to navigation Jump to search
(summarize a few log entries)
(details on file creation)
Line 3: Line 3:
Do not delete these log files!  Removing them means you cannot use Amanda tools to locate older backups (the information to restore the most recent backup is kept in the [[curinfo|curinfo database]], and is read by "amadmin xx info").
Do not delete these log files!  Removing them means you cannot use Amanda tools to locate older backups (the information to restore the most recent backup is kept in the [[curinfo|curinfo database]], and is read by "amadmin xx info").


At the end of a run, logfiles for runs whose tapes have been reused are moved into a subdirectory named '''oldlog''' inside the ''logdir'' directory.  This is done by <tt>amtrmlog</tt>, which is called by the [[amdump]] shell script.  It is up to the administrator to remove older log files from the '''oldlog''' subdirectory.
= File Creation =
During a run, the various components of Amanda write lines to {{file|$logdir/log}}.  The presence of this file indicates that an Amanda application is running (really, that Amanda is using a device), and will cause most applications to suggest that the user run amcleanup.  When a run is complete, {{file|amlogroll}} renames {{file|log}} to the full filename, pulling the datestamp from the file itself and using the zero-based sequence number to disambiguate logfiles with the same datestamp.
 
At the end of a run, amdump calls {{file|amtrmlog}} to move logfiles for runs whose tapes have been reused into a subdirectory named '''oldlog''' inside the ''logdir'' directory.  It is up to the administrator to remove older log files from the '''oldlog''' subdirectory.


= File Format =
= File Format =

Revision as of 04:20, 28 April 2009

Each dump or flush creates a file named log.YYYYMMDDHHMMSS.N (or, if usetimestamps is off, log.YYYYMMDD.N) in the logdir directory, where YYYYMMDDHHMMSS is the timestamp of the start of the amdump/amflush run, and N is a sequence number starting at 0. These log files represent the Amanda catalog -- the database describing the contents of storage volumes (tapes). They are used for generating backup reports with amreport, tracking dumps with amadmin - find, and finding the required tapes for restore operations.

Do not delete these log files! Removing them means you cannot use Amanda tools to locate older backups (the information to restore the most recent backup is kept in the curinfo database, and is read by "amadmin xx info").

File Creation

During a run, the various components of Amanda write lines to $logdir/log. The presence of this file indicates that an Amanda application is running (really, that Amanda is using a device), and will cause most applications to suggest that the user run amcleanup. When a run is complete, amlogroll renames log to the full filename, pulling the datestamp from the file itself and using the zero-based sequence number to disambiguate logfiles with the same datestamp.

At the end of a run, amdump calls amtrmlog to move logfiles for runs whose tapes have been reused into a subdirectory named oldlog inside the logdir directory. It is up to the administrator to remove older log files from the oldlog subdirectory.

File Format

Each line in the file begins with a keyword and a program name, followed by keyword/program-specific text. The following description is organized by program, and then by keyword. It is not complete, and is based on a possibly-incorrect reading of the current Amanda source.

taper

START

START taper timestamp label label tape t

This message indicates that the taper is starting a new tape. The first occurrence of this message will have t equal to 1, and t will count up from there. The timestamp will always match the timestamp of the logfile.

PART

PART taper label filenum hostname diskname dump_timestamp partnum/nparts level [sec secs kb kb kbps kbps]

This indicates that the taper has written a file, filenum, to volume label. The file contains a part (perhaps the only part) of the dump identified by hostname, diskname, dump_timestamp, and level, where dump_timestamp is the timestamp of the run in which the client dump took place, and may not be the same as the timestamp of the logfile.

DONE

DONE taper hostname diskname dump_timestamp nparts level [sec secs kb kb kbps kbps]

This indicates that the taper has completely written the given dump to tape, and will only occur after all parts are written.

PARTIAL

PARTIAL taper hostname diskname dump_timestamp nparts level [sec secs kb kb kbps kbps]

This indicates that the taper has partially written the given dump to tape, but encountered an error. The format is identical to DONE.

dumper

chunker

driver

planner

Examples

Below are some examples of important messages with explanation in this log file.

  • START taper datestamp datestamp label tape-label tape current-tape
START taper datestamp 20070305162948 label test-00 tape 0

This indicates that the taper started to write a tape.

  • INFO taper tape tape label kb total tape used fm filemark [error or OK]
INFO taper tape test-00 kb 1472 fm 1 [OK]

This indicates that the taper has completed a tape and is writing and end marker.

  • FINISH planner date datestamp time time elapsed since planner started.
FINISH planner date 20070305162948 time 0.294

This indicates that the planner has finished creating its plan, and dumping can begin.

  • SUCCESS taper client disk datestamp level [ sec time-took kb output-kb kp/s KB-per-second {wr: writers number of writes rdwait read wait time wrwait write wait time filemark filemark wait time}]
SUCCESS taper localhost /tmp/quicktest/data 20070305162948 0 [sec 0.205 kb 1440 kps 7021.9 {wr: writers 46 rdwait 0.192 wrwait 0.011 filemark 0.0}]

This indicates that a dump has been successfully written to tape.

  • SUCCESS dumper client disk timestamp level [sec total runtime kb size of dump kps kp per second orig-kb original size]
SUCCESS dumper localhost /tmp/quicktest/data 20070305162948 0 [sec 0.169 kb 1430 kps 8437.1 orig-kb 1430] 

This indicates that a dump has been successfully dumped (either to holding or directly to tape).