Amanda log files: Difference between revisions

From wiki.zmanda.com
Jump to navigation Jump to search
(Reworked Log and Debug files on the Backup Server)
mNo edit summary
Line 1: Line 1:
__TOC__
__TOC__


==Log and Debug Files on the Backup Server==
==Log and debug files on the Amanda server==


===amdump.NN and amflush.NN===
===amdump.NN and amflush.NN===
Line 31: Line 31:
It can also contain hardware error logs.
It can also contain hardware error logs.


==Log and Debug Files on the Backup Client==
==Log and debug files on the Amanda client==


The different commands 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:
The different commands 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:

Revision as of 13:53, 8 December 2005

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.

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.

Log and debug files on the Amanda client

The different commands 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 distro's have it defined as /var/log/amanda. This directory should be writeable by the dumpuser on the client. Amanda tries to create it if it does not exist.

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
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

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.

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.