Amanda log files: Difference between revisions

From wiki.zmanda.com
Jump to navigation Jump to search
m (Fix broken links for Amanda log files)
 
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
__TOC__
Amanda produces several types of log files, with distinct purposes.


==Log and debug files on the Amanda server==
* [[Amanda_log_files/Debug Logs|Debug Logs]] ({{file|{server,client}/''config''/''prog''.YYYYMMDDHHMMSS.debug}}) contain debugging messages that are useful for finding bugs in Amanda.
 
* [[Amanda_log_files/Amdump Logs|Amdump Logs]] ({{file|amdump.N}} or {{file|amflush.N}}) contain a description of amdump's actions, parsed by amstatus.  Amflush has a similar mechanism.
===amdump.NN and amflush.NN===
* [[Amanda_log_files/Trace Logs|Trace Logs]] ({{file|log.YYMMDDHHMMSS.N}} or {{file|log.YYYYMMDD.N}}) contain specially formatted log messages about a run which can later be read by other Amanda applications to find out what Amanda did during the run.
 
* Syslog may also contain errors from ''inetd'' or ''xinetd'', or hardware errors indicating problems with hard drives, tape changers, tape drives, etc.
[[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.
{{Languages}}
 
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.
 
 
===Debug log files===
 
Debug log files from Amanda server processes are under AMANDA_DBGDIR directory (for example: /tmp/amanda).
 
==Log and debug files on the Amanda client==
 
===Locating the AMANDA_DBG directory===
 
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.
 
===Debug files from libexec programs===
 
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
 
===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.

Latest revision as of 18:16, 16 December 2023

Amanda produces several types of log files, with distinct purposes.

  • Debug Logs ({server,client}/config/prog.YYYYMMDDHHMMSS.debug) contain debugging messages that are useful for finding bugs in Amanda.
  • Amdump Logs (amdump.N or amflush.N) contain a description of amdump's actions, parsed by amstatus. Amflush has a similar mechanism.
  • Trace Logs (log.YYMMDDHHMMSS.N or log.YYYYMMDD.N) contain specially formatted log messages about a run which can later be read by other Amanda applications to find out what Amanda did during the run.
  • Syslog may also contain errors from inetd or xinetd, or hardware errors indicating problems with hard drives, tape changers, tape drives, etc.

Other languages: [[::Amanda log files|English]] {{#ifexist: {{#if: | | {{#if: | :}}Amanda log files}}/Fr |  • {{#if: |français| [[::Amanda log files/Fr|français]]}}|}}

{{#ifexist: {{#if: | | {{#if: | :}}Amanda log files}}/Zh-cn |  • {{#if: |中文(中国大陆)| [[::Amanda log files/Zh-cn|中文(中国大陆)]]}}|}}