cancel
Showing results for 
Search instead for 
Did you mean: 

how to use -f filelist on bprestore

T_N
Level 6

Hi All,

 

Anyone knows how to use -f filelist of bprestore ?  What's format of it?

 

here:

 

bprestore -B -w -L /tmp/dpi01.tom.log -R /usr/openv/netbackup/scripts/changtofil -C cb-flor-bm13.noceast.dws.disney.com -D cb-flor-bm13.noceast.dws.disney.com t 0 -s 07/29/2008 -e 08/31/2008 -f /tmp/dpitom.txt

 

Thanks

 

Tom

6 REPLIES 6

J_H_Is_gone
Level 6
this is from the help pages.


-f listfile
Specifies a file (listfile) that contains a list of files to be restored and can be used instead of the filenames option. In listfile, list each file path on a separate line.

The required format for the file list depends on whether the files have spaces or newlines in the names.

To restore the files that do not have spaces or new lines in the names, use this format:

filepath

Where filepath is the path to the file that you restore. For example:

Note: Use upper case for the drive letter. For example, C:\NetBackup\Log1.
C:\programs

C:\winnt

C:\documents\old_memos

To restore the files that have spaces or new lines in the names, use one of the following formats:

filepathlen filepath

filepathlen filepath start_date_time end_date_time

filepathlen filepath -s datetime -e datetime

The filepath is the path to the file you restore.

The filepathlen is the total number of characters in the file path.

The start_date_time and end_date_time are the decimal number of seconds since 01/01/1970 00:00:00.

datetime is the same as the command line (mm/dd/yy [hh[:mm[:ss]]]). The command uses the start date, end date, and time from the command line unless a line in listfile overrides it. The dates may change from line to line.

To exclude a file or a directory path that was previously included in the restore, place an exclamation mark (!) in front of the file or the directory path. (Exception: NDMP restores)

The following is an example that uses filepathlen filepath:

11 C:\programs

8 C:\winnt

22 C:\documents\old memos

17 !C:\programs\test

filenames
Names one or more files to be restored and can be used instead of the -f option.

Any files that you specify must be listed at the end, following all other options. You must also specify absolute file paths. To exclude a file or a directory path that was previously included in the restore, place an exclamation mark (!) in front of the file or the directory pat. (Exception: NDMP restores.)

Use upper case for the drive letter. For example, C:\NetBackup\log1.

EXAMPLES

Example 1

Restore files from backups of file1 that were performed between 04/01/2006 06:00:00 and 04/10/2006 18:00:00. Enter the following:

(Enter all on one line.)

bprestore -s 04/01/06 06:00:00 -e 04/10/06 18:00:00 C:\user1\file1
Example 2

To restore the files that are listed in a file named restore_list by using the most recent backups, enter the following:

bprestore -f c:\restore_list

T_N
Level 6

Thanks, another question how could I change \  to /  by sed command ?

 

\dwdpi11-0dp\DPI\Primary\20080817\STUDIO\SUNSET3\HIGHRES\WDW2BF20633-

 

to 

 

/dwdpi11-0dp/DPI/Primary/20080817/STUDIO/SUNSET3/HIGHRES/WDW2BF20633

 

 

 

 

 

Wim_Langhmans
Level 2
echo ${string} | sed 's/\\/\//g'

T_N
Level 6

Thanks it's helpful for me.

One more question: do you know how to restore form unix server to ndmp server ?

Wim_Langhmans
Level 2
Sorry Tom, I currently don't have any experience regarding NDMP servers

Andy_Welburn
Level 6
Really can't remember if I've done this directly (& I know you can't do it directly NDMP -> UNIX/Windows), but if you export an NFS mount of the required NDMP volume/qtree/share/whatever on the UNIX server you could certainly do it that way.