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

1 Solution

Accepted Solutions
Accepted Solution!

Re: How to restore files with specific pattern in their names

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

View solution in original post

5 Replies

Re: How to restore files with specific pattern in their names

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.

Re: How to restore files with specific pattern in their names

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

Tags (2)

Re: How to restore files with specific pattern in their names

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. 



Highlighted

Re: How to restore files with specific pattern in their names

Dear Marianne,

I totally agree with you, but it did work, maybe it's beginner's luck Smiley Happy

Yours

Mohammad

Tags (2)
Accepted Solution!

Re: How to restore files with specific pattern in their names

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

View solution in original post