View Full Version : HELP!!! - amrecover fails when restoring virtual tapes from a different server

February 25th, 2013, 12:45 PM

One of our servers failed and I ma trying to recover a folder on another server.

We are running Amanda 3.1.3 on Fedora 14 servers with virtual tapes.

The backups are running fine. I can see the latest backup from this morning in .../vtapes/slot29. The latest full backup is in .../vtapes/slot14.

I have attached and mounted a USB HDD with the backup vtapes on the working server.

When I try to read the backup tapes, Amanda sees the contents as expected:
$ amtape failedserver show
amtape: scanning all 90 slots in changer:
slot 29: date 20130225040201 label MyData28
slot 1: date 20130129162430 label MyData01
slot 28: date 20130224040201 label MyData27

However, when I try to recover the files, I get:
# amrecover failedserver
AMRECOVER Version 3.1.3. Contacting server on localhost ...
220 workingserver AMANDA index server (3.1.3) ready.
Setting restore date to today (2013-02-25)
200 Working date set to 2013-02-25.
200 Config set to failedserver.
501 Host workingserver.mydomain.com is not in your disklist.
Trying host hercules.mventix.com ...
501 Host workingserver.mydomain.com is not in your disklist.
Trying host hercules ...
501 Host workingserver is not in your disklist.
Trying host localhost.localdomain ...
501 Host localhost.localdomain is not in your disklist.
Trying host localhost ...
200 Dump host set to localhost.
Use the setdisk command to choose dump disk to recover
amrecover> listdisk
200- List of disk for host localhost
201- /snap_root
201- /snap_apps
201- /boot
201- /snap_home
201- /snap_opt
201- /snap_tmp
201- /snap_usr
201- /snap_var
200 List of disk for host localhost
amrecover> setdisk /snap_home
200 Disk set to /snap_home.
500 No dumps available on or before date "2013-02-25"
No index records for disk for specified date
If date correct, notify system administrator

I have tried using setdevice localhost:file:/.../vtapes/slot29 before using setdisk but the result is the same.

Any help will be greatly appreciated!!!

February 25th, 2013, 01:03 PM
Were running it on Amanda server or the working-server? Are the working-server and failed-server the Amanda client

February 25th, 2013, 01:32 PM
Yes - the Amanda server is on the workingserver. The virtual tapes from the failedserver are on a USB HDD that is attached to the workingserver. I am trying to use the Amanda client on the workingserver to recover files from the failedserver.

Both the Amanda sever and client components are functioning properly on the working server when Amanda is backing it up and restoring from localhost virtual tapes mounted on an internal HDD (e.g., /backup).

February 25th, 2013, 02:15 PM

dd if=<vtape-file> bs=32k skip=1 | /usr/lib/amanda/application/amgtar restore

February 25th, 2013, 02:49 PM
# dd if=/backup/amanda/vtapes/slot69/00000.MyData28 bs=32k skip=1 | /usr/lib64/amanda/application/amgtar restore
0+0 records in
0+0 records out
0 bytes (0 B) copied, 3.3819e-05 s, 0.0 kB/s
/bin/tar: This does not look like a tar archive
/bin/tar: Exiting with failure status due to previous errors

February 25th, 2013, 02:54 PM
dd the 00001.*** file, the 00000.**** is not the data file.

February 25th, 2013, 03:02 PM
This seems to work. Does it trace back incremental backups to the latest full one?

For example, I have:

Will this automatically restore all files to:

February 25th, 2013, 03:07 PM
I don't think it can trace back the incremental backups. Can you try replace /etc/amanda (new server) and vtapes directory (new server) by the same directories from failed server?

February 25th, 2013, 03:24 PM
That's the first thing I tried but then I got the indexing error from my original post.

I tried amtape working server show after copying the vtapes and adjusting amanda.conf. As a result, I see the tape names but still run into my original indexing problem when trying to restore. Clearing tapelist yields the same result. I even tried coping amanda/state/index but no joy.

February 26th, 2013, 09:31 AM
You can try use that command to restore the full backup first and then restore the incrementals one by one in the same directory.