Page last modified 23:16, 5 May 2006 by Ppragin?

How to determine table of contents of an amanda virtual backup tape

Table of contents
No headers

Use this to get a list of tapes in the virtual changer:

-bash-3.00$ amtape  disk show
amtape: scanning all 25 slots in tape-changer rack:
slot 1: date 20060503163324 label disk-1
slot 2: date 20060503165145 label disk-2
slot 3: date 20060504120909 label disk-3
slot 4: date 20060504121020 label disk-4
slot 5: date X        label disk-5
slot 6: date X        label disk-6
slot 7: date X        label disk-7
slot 8: date X        label disk-8
slot 9: date X        label disk-9
slot 10: date X        label disk-10
slot 11: date X        label disk-11
slot 12: date X        label disk-12
slot 13: date X        label disk-13
slot 14: date X        label disk-14
slot 15: date X        label disk-15
slot 16: date X        label disk-16
slot 17: date X        label disk-17
slot 18: date X        label disk-18
slot 19: date X        label disk-19
slot 20: date X        label disk-20
slot 21: date X        label disk-21
slot 22: date X        label disk-22
slot 23: date X        label disk-23
slot 24: date X        label disk-24
slot 25: date 20060503123041 label disk-25

Use this to load the tape in to the tape drive:

-bash-3.00$ amtape  disk slot 4
amtape: changed to slot 4 on file://var/lib/amanda/vtapes/disk

Rewind the tape:

ammt -f file://var/lib/amanda/vtapes/disk rewind

Use this to get the table of contents of the tape including hostname, file system, dumptype, date, and backup level:

-bash-3.00$ ammt -f file://var/lib/amanda/vtapes/disk fsf 1
-bash-3.00$ amdd if=file://var/lib/amanda/vtapes/disk bs=32k count=1
AMANDA: FILE 20060504121020 /etc  lev 1 comp .gz program /bin/tar
To restore, position tape at start of file and run:
       dd if=<tape> bs=32k skip=1 |   /bin/gzip -dc | /bin/tar -f - ...