Forum Discussion

mohammad_yaseen's avatar
8 years ago

How to restore files with specific pattern in their names

Dear All.

I need your support to find a way to restore fills with specific pattern using command line on UNIX server, noting that I'm full aware of this post and I'm using it with files I have their exact names :https://www.veritas.com/support/en_US/article.000009662

Below you can find samples of files patterns:

/JTGRATINGPROD/applications/bscsprod/archive01/WORK/JTG/MP/SWITCH/MSC/PROCSSED/MSC20160904*
/JTGRATINGPROD/applications/bscsprod/archive01/WORK/JTG/MP/SWITCH/MSC/PROCSSED/MSC20160908*

Thanks

  • Venkatesh_K's avatar
    Venkatesh_K
    8 years ago

    yes thats the right format, here is example in case if it helps....

     

    /usr/openv/netbackup/bin/bprestore -s 3/26/2015 -e 3/26/2015 -t 13 -C Source_Client -D Dest_client -L /tmp/restore/logs/Restore_`date +%h%d_%R`.log -R /tmp/restore/alt_location -f /tmp/restore/filelist

     

    -t 13 specifies its a windows client

5 Replies

  • You need to specify the files you want to resrore, you can't say "bprestore *.jpg".

    You need to list files in backup, filter the output to match the files you want to restore, and put the result in a text file (the technote call this file /tmp/res/filelist). Then call bprestore with the -f option - as the tech note also mention.

    • mohammad_yaseen's avatar
      mohammad_yaseen
      Level 4

      Dear Nicolai,

       

      Much appreciated, we found the solution to use (*) on the below command by omitting the option  " -t 13" from the post: https://www.veritas.com/support/en_US/article.000009662

      bprestore -s $STARTDATE -S $MASTER -C $SOURCE -D $DESTINATION -L $LOGFILE -R $RENAMEFILE -f $FILELIST -t 13

      bprestore -s $STARTDATE -S $MASTER -C $SOURCE -D $DESTINATION -L $LOGFILE -R $RENAMEFILE -f $FILELIST

      • Marianne's avatar
        Marianne
        Level 6

        I beg to differ.

        Look at step 2 in the TN:

        2.  Create a file called /tmp/res/filelist containing the files you wish to recover, for example :

        /netbackup/testdata/file1
        /netbackup/testdata/file2
        .....

        The 'filelist' file contains full pathnames.
        No wildcards.