Results 1 to 2 of 2

Thread: Amrecover inserts weird "driveX" into path fails to find backup folder

  1. #1
    Join Date
    May 2016
    Posts
    2

    Default Amrecover inserts weird "driveX" into path fails to find backup folder

    Hello,

    have read documentation (thumbs up, they looks good and detailed), searched forums, but have not found any hint, why amrecover fails to restore backup from virtual tape changer.

    Backup is working properly, I see data backed up from 6 sources and virtual tapes are rotating. Now I have tried to restore to validate backup and create restoration howto procedure. However I failed to restore via amrestore. Amrestore for some reason inserts "driveX" path component into vtapes path, like this "/var/backup/amanda/vtapes/drive2/data/". Empty folder driveX is also created on server, next to vtapes.

    What did I miss to configure?

    On client where I am trying to restore data:

    [root@phabricator backups]# amrecover DailySet1 -s x.x.x.17
    AMRECOVER Version 3.3.3. Contacting server on x.x.x.17 ...
    220 backup AMANDA index server (3.3.3) ready.
    Setting restore date to today (2016-05-09)
    200 Working date set to 2016-05-09.
    200 Config set to DailySet1.
    501 Host phabricator is not in your disklist.
    Use the sethost command to choose a host to recover
    amrecover> sethost x.x.x.100
    200 Dump host set to x.x.x.100.
    amrecover> ls
    Must select a disk before listing files; use the setdisk command.
    amrecover> setdisk /backups
    200 Disk set to /backups.
    amrecover> ls
    2016-05-09-00-45-01 varrepo-2016-05-08.tgz
    2016-05-09-00-45-01 varrepo-2016-05-07.tgz
    2016-05-09-00-45-01 mysqldump-2016-05-08.gz
    2016-05-09-00-45-01 mysqldump-2016-05-07.gz
    2016-05-09-00-45-01 .
    amrecover> add mysqldump-2016-05-08.gz
    Added file /mysqldump-2016-05-08.gz
    amrecover> extract

    Extracting files using tape drive chg-disk:/var/backup/amanda/vtapes on host amandahost.
    The following tapes are needed: DailySet1-06

    Extracting files using tape drive chg-disk:/var/backup/amanda/vtapes on host amandahost.
    Load tape DailySet1-06 now
    Continue [?/Y/n/s/d]? y
    Error checking directory /var/backup/amanda/vtapes/drive2/data/: No such file or directory
    Load tape DailySet1-06 now
    Continue [?/Y/n/d]?
    Error checking directory /var/backup/amanda/vtapes/drive3/data/: No such file or directory
    Load tape DailySet1-06 now
    Continue [?/Y/n/d]?


    On server:
    I even did manually loaded slot 6 as described in, before continuing with extraction (it looks like it does not change anything):
    http://wiki.zmanda.com/index.php/How_To:Restore_from_Virtual_Tapes

    Code:
    [root@backup ~]# su - amandabackup -c "amtape DailySet1 slot 6"
    slot   6: time 20160509004501 label DailySet1-06
    changed to slot 6
    After each unsuccesfull attempt to extract, amrecover creates me new driveX folder and number is increasing.

    [root@backup vtapes]# ls -al
    total 64
    drwxr-xr-x. 16 amandabackup tape 4096 2016-05-09 01:56 .
    drwxr-xr-x. 5 amandabackup tape 4096 2016-04-15 05:44 ..
    lrwxrwxrwx. 1 amandabackup disk 5 2016-05-09 01:32 data -> slot6
    drwx------. 2 amandabackup tape 4096 2016-05-06 08:15 drive0
    drwx------. 2 amandabackup tape 4096 2016-05-09 01:30 drive1
    drwx------. 2 amandabackup tape 4096 2016-05-09 01:32 drive2
    drwx------. 2 amandabackup tape 4096 2016-05-09 01:56 drive3

    drwxr-xr-x. 2 amandabackup tape 4096 2016-05-04 01:17 slot1
    drwxr-xr-x. 2 amandabackup tape 4096 2016-05-03 00:19 slot10
    drwxr-xr-x. 2 amandabackup tape 4096 2016-05-05 00:13 slot2
    drwxr-xr-x. 2 amandabackup tape 4096 2016-05-06 00:12 slot3
    drwxr-xr-x. 2 amandabackup tape 4096 2016-05-07 00:13 slot4
    drwxr-xr-x. 2 amandabackup tape 4096 2016-05-08 00:11 slot5
    drwxr-xr-x. 2 amandabackup tape 4096 2016-05-09 00:11 slot6
    drwxr-xr-x. 2 amandabackup tape 4096 2016-04-30 00:14 slot7
    drwxr-xr-x. 2 amandabackup tape 4096 2016-05-01 00:12 slot8
    drwxr-xr-x. 2 amandabackup tape 4096 2016-05-02 00:12 slot9
    [root@backup vtapes]#

    Also changer file is populated with records, referring to invalid path

    Code:
    $STATE = {
               'drives' => {
                             '/var/backup/amanda/vtapes/drive0' => {},
                             '/var/backup/amanda/vtapes/drive2' => {},
                             '/var/backup/amanda/vtapes/drive1' => {},
                             '/var/backup/amanda/vtapes/drive3' => {}
                           },
               'meta' => undef
             };
    Server configuration:
    Code:
    tapedev "chg-disk:/var/backup/amanda/vtapes"
    tapetype NFS-DISK
    labelstr "^DailySet1-[0-9]*$"
    define tapetype NFS-DISK {
      length 200 gbytes
        filemark 4 kbytes
        }
    autolabel "DailySet1-%%" EMPTY VOLUME_ERROR
    amrecover_changer "changer"  
    holdingdisk hd1 {
        comment "main holding disk"
        directory "/var/spool/amanda"       # where the holding disk is
        use -1000 Mb                # how much space can we use on it
                                    # a non-positive value means:
                                    # use all space but that value
        chunksize 1Gb       # size of chunk if you want big dump to be
                            # dumped on multiple files on holding disks
                            #  N Kb/Mb/Gb split images in chunks of size N
                            #             The maximum value should be
                            #             (MAX_FILE_SIZE - 1Mb)
                            #  0          same as INT_MAX bytes
        }
    dumpcycle 7 days        # the number of days in the normal dump cycle
    tapecycle 10 tapes      # the number of tapes in rotation

  2. #2
    Join Date
    May 2016
    Posts
    2

    Default

    I seem to have resolved, although now I am not sure what did I change.

    Recovery started to work properly after I added virtual changer configuration from example in chg-disk script comments.

    By commenting out settings and trying to restore, I have left only tapedev and tpchanger options and restore still works.
    Code:
    tapedev  "file:/var/backup/amanda/vtapes"
    #changerdev "/dev/null"
    #changerfile "chg-disk"
    tpchanger "chg-disk"
    #changerfile "/var/lib/amanda/DailySet1/changer"
    As I was commenting out settings that did not work (so I can see what I have tried before) I now see that I should have tried this combination. And this confuses me.

    Code:
    #tapedev "chg-disk:/var/backup/amanda/vtapes"
    
    #tpchanger "chg-disk:/var/backup/amanda/vtapes"
    
    #define changer "vtapes" {
    #  tpchanger "chg-disk:/var/backup/amanda/vtapes"
    #}
    #tapedev "vtapes"
    
    #tapedev  "file:/var/backup/amanda/vtapes"
    #tpchanger "chg-disk"
    However problem seems to be solved and I can continue on writing DR HowTo document.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •