Page last modified 00:37, 4 May 2006 by Ppragin?
Zmanda Documentation > Using amrestore to extract data from vtapes

Using amrestore to extract data from vtapes

Table of contents
No headers

1. The config name is "disk"
2. The client host name is "ppragin"
3. The file system we want to restore in "/boot"

Find what tapes you need to restore the /boot filesystem from for host "ppragin":

-bash-3.00$ amadmin disk find ppragin /boot
date                host               disk  lv tape or file file part status
2006-05-03 12:30:41 ppragin.zmanda.com /boot  1 disk-25         3   -- OK
2006-05-03 16:33:24 ppragin.zmanda.com /boot  1 disk-1          3   -- OK
2006-05-03 16:51:45 ppragin.zmanda.com /boot  1 disk-2          3   -- OK
-bash-3.00$


Find the most recent backup of the /boot filesystem for host "ppragin":

-bash-3.00$ amadmin disk info ppragin /boot
Current info for ppragin.zmanda.com /boot:
Stats: dump rates (kps), Full:   -1.0,  -1.0,  -1.0
                   Incremental:  2976.0, 1488.0, 2976.0
         compressed size, Full: -100.0%,-100.0%,-100.0%
                   Incremental:  82.0%, 82.0%, 82.0%
 Dumps: lev datestmp  tape             file   origK   compK secs
         1  20060503  disk-2           3 3630 2976 1
-bash-3.00$

Show the contents of all the slots:

-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 X        label disk-3
slot 4: date X        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
-bash-3.00$

Load the "disk-2" tape from "slot 2":

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

To rewind the vtape and restore:

cd /restore
amtape disk slot 2 #load the tape from slot 2
-bash-3.00$ amrestore -f 0 file:/var/lib/amanda/vtapes/disk ppragin /boot
amrestore: 1: skipping ppragin.zmanda.com._var.20060503165145.1
amrestore: 2: skipping ppragin.zmanda.com._etc.20060503165145.1
amrestore: 3: restoring ppragin.zmanda.com._boot.20060503165145.1
amrestore: 4: reached end of information
-bash-3.00$ ls
ppragin.zmanda.com._boot.20060503165145.1