Amanda log files

From wiki.zmanda.com
Jump to navigation Jump to search

Log and debug files on the Amanda server

amdump.NN and amflush.NN

Amdump puts a trace of the actions in a file named amdump in the logdir directory which was specified in amanda.conf. Amflush outputs the trace of actions in a file name amflush in the same directory.

When the dump or flush is finished, the file is renamed to amdump.1 or amflush.1. The name of the older files is also rotated: the previous file amdump.1 is then found under amdump.2 etc. so that the most recent file has the lowest number. Amanda keeps roughly the last tapecycle worth of them.

These log files can be used for debugging an amdump or amflush run.

The most recent of the four files amdump, amflush, amdump.1 amflush.1 is read by the amstatus command. These files can also be analyzed by amplot to visualize the behavior of Amanda.

log.YYYYMMDD.N

Each run also creates a file named log.YYYYMMDD.N in the logdir directory. YYYYMMDD is the datestamp of the start of the amdump/amflush run, and N is a sequence number starting at 0.

This log file is used for generating backup reports with amreport. Each line in the file begins with a keyword. Depending on the keyword, rest of the line is parsed. Backup statistics can be obtained from this log file.

These log files also serve as information source to locate the dumps on tapes with "amadmin xx find". 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 infodir database, see amanda.conf, 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. It is up to the administrator to remove older log files from the oldlog subdirectory.

Some examples of importane messages with explanations in this log file.

  • START taper datestamp 20070305162948 label test-00 tape 0
START taper datestamp  datestamp label tape-label tape current-tape
  • INFO taper tape test-00 kb 1472 fm 1 [OK]
INFO taper tape tape label kb total tape used fm filemark [error or OK]
  • FINISH planner date 20070305162948 time 0.294
FINISH planner date datestamp time time elapsed since planner started.
  • 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
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 dumper localhost /tmp/quicktest/data 20070305162948 0 [sec 0.169 kb 1430 kps 8437.1 orig-kb 1430]
SUCCESS dumper client disk timestamp level [sec total runtime kb size of dump kps kp per second orig-kb original size]

Syslog

Don't forget to check the system log (logged by syslogd utility). This log may contain errors regarding (x)inetd configuration. It can also contain hardware error logs.


Debug log files

Debug log files from Amanda server processes are under AMANDA_DBG directory (for example: /tmp/amanda). Log files are stored in specific configuration sub-directory. All Amanda server processes (such as amindexd, amtapeidxd, planner, dumper, driver) log to files under server subdirectory. Amandad runs on Amanda server as well as Amanda client. So amandad debug log files are stored under amandad sub-directory. So, the debug directory structure is AMANDA_DBG/<Amanda configuration>/{server, client, amandad}.

$ amadmin x version | grep DBG
AMANDA_DBG=/tmp/amanda

Log and debug files on the Amanda client

Locating the AMANDA_DBG directory

The processes that run on the Amanda client (amandad, sendsize, runtar, rundump) create files with debugging information in the AMANDA_DBG directory. This directory is defined at compile time and can be found with the amadmin command:

$ amadmin x version | grep DBG
AMANDA_DBG=/tmp/amanda

Usually the value is /tmp/amanda, but some distributions have the value defined as /var/log/amanda. This directory should be writeable by the backup user (for example: amandabackup) on the client. Amanda tries to create it if it does not exist.

Debug files from Amanda client programs

All Amanda client programs (such as runtar, sendbackup, sendsize) log messages to files under client subdirectory. Amandad runs on Amanda server as well as Amanda client. So amandad debug log files are stored under amandad sub-directory.

The debug directory structure is AMANDA_DBG/<Amanda configuration>/{server, client, amandad}.

The first part of the debug filename is the command name, followed by the date and time when the command was started, optionally followed by a sequence number, and ends in ".debug":

$ ls /tmp/amanda/DailySet1/{amandad,client}/
amandad.20051207000402.debug
amandad.20051207000402000.debug
amandad.20051207004031.debug
amandad.20051207004713.debug
runtar.200512070004031.debug
runtar.200512070004713.debug
sendbackup.20051207004031.debug
sendbackup.20051207004713.debug
sendsize.20051207000402.debug

Debugging amrecover

The amrecover command communicates with the programs amindexd on the Amanda index server and amidxtaped on the Amanda tape server (usually the same host), and both of these programs create a debug file, amindexd.datetime.debug and amidxtaped.datetime.debug in AMANDA_DBG on the Amanda server.

The Amanda server also trims the server Log files (see above) and index files, and these two utilities store their debug information on the server AMANDA_DBG directory: amtrmlog.datetime.debug and amtrmidx.datetime.log.

Debug files are automatically cleaned

The debug files are removed automatically by Amanda after a few days, usually 4, a value defined at compile time:

$ amadmin x version | grep DAYS
AMANDA_DEBUG_DAYS=4

You may remove the files manually, especially handy when debugging a setup, and concentrating only on the debug files created in the last run.