How To:Recover Lost Amanda Configuration

From The Open Source Backup Wiki (Amanda, MySQL Backup, BackupPC)

Jump to: navigation, search

This article is a part of the How Tos collection.

Recovering amanda.conf

This section assumes that the user has backed up amanda configuration files using Amanda.

Always restore amanda configuration to a temporary directory so that useful information is not overwritten!

  • Insert the correct media with amanda configuration with level 0 dump. To figure out the media information, take a look at the mail reports to find the recent level 0 dump. If reports are not available, see next section. You can look index files to find out when level 0 dump was done.
  • Rewind the tape
# mt -t <tape device name> rewind
  • Restore the media contents to temporary new directory. The command used for restoration depend what command was

for backup. If gtar was used for backup, use the following command. Use restore command if backups were made with dump command

# amrestore -p <non rewinding tape device name> <servername> '/disk/list/entry$' | gtar -xvpf - ./relative path/to/amanda.conf

Determining the tape contents if reports are not available

If tape table of contents (TOC) is not available, you can generate it from the log files (named log.<date>.<run #>). Use amtoc(8) to generate table of contents. The command will display the server, partition, dump date, dump level and dump size for each entry.

If the log files are not available, all tapes have to be read manually to find which tape contains the dump. First 32k of each tape file (file header) contains DLE, dump level and datestamp. It also contains the command that can be used to restore the dump.

# mt -f <tape device name> fsf 1
# dd if=<tape_dev> bs=32k count=1
Personal tools