09-20-2011 09:48 PM
hello,
i have a general questions...in Netbackup..for both Unix and windows enviornment...
i would like to know the size of the data(file system/directory) that i am going to start the restore...?
i mean ...i need to find the size of the before i start the restore job...
i know i can find the size of the backup images/and a individual files...
but my question if for the directories/file systems those may be in single backup images.. or in multiple backup images...
any idea...thank very much in advance.
Solved! Go to Solution.
09-21-2011 07:46 AM
Ahh I see. Well there is no out of the box functionality you can use. But if you do a little scripting you may archive the goal.
You can use bpflist - The command is only available on the master server and is undocumented. But there is a tech note about the usage :
Definition of each field in the bpflist command output
http://www.symantec.com/docs/TECH34317
The idea is that you either specify a backup image or a time frame to list the files. Use grep/findstr to find the files/directories in question. The technote above state field 14 is the files size (0 if a directory). You need to count the file size for each file to find a total.
bpflist can be a little tricky to use, but there are some examples here: http://www.mass.dk/netbackup/quick-hints/64-bpflist.html
bpflist: [-l | -L | -U] [-v]
[-M master_server...]
[-d mm/dd/yyyy HH:MM:SS][-e mm/dd/yyyy HH:MM:SS]
[-ut <unixtime for start and end date>]
[-st sched_type]
[-policy policy_name][-client client_name]
[-keyword "keyword phrase"][-pattern fullpath]
[-pt policy_type]
[-user name][-group name][-raw mode]
[-backupid name][-force_print]
[-psep path_separator_character]
[-malgo match_algorithm (0 1 2 or 3)]
[-rl recursion_level (0..999)]
[-option <list of:
NONE ONE_PASS NO_HSHAKE GET_ALL_FILES
INCLUDE_TIR ONLY_TIR ONLY_DIRS FILESYSTEM_ONLY
ONE_CONNECT INCLUDE_RAW_INCR INCLUDE_BITMAP INCLUDE_FSMAP
INCLUDE_EDI IGNORE_CASE INCLUDE_EFI>]
bpflist: -complete -policy policy_name [-client client_name][-st sched_type][-bt <unixtime>]
Valid values for sched_type:
FULL, INCR, CINC, UBAK, UARC, ANY, SCHED, USER, NOT_ARCHIVE
Valid values for policy_type:
Standard, Oracle, Informix-On-BAR, Sybase,
MS-SharePoint, NetWare, MS-Windows-NT,
OS/2, MS-SQL-Server, MS-Exchange-Server,
SAP, DB2, NDMP, FlashBackup, AFS, DataStore,
Lotus-Notes, FlashBackup-Windows, NBU-Catalog,
Generic, PureDisk-Export
09-20-2011 11:02 PM
Size of Files / directory you can see in BAR GUI ( b4 starting restoration )
09-20-2011 11:23 PM
using bpimagelist option you will be able to see the size of the full backup image you are going to restore
with bplist command you will be able to see the size of each file (just like your file structure )
09-21-2011 06:01 AM
Do like this:
bpimagelist -backupid xxx-yyy | grep IMAGE | awk '{ print $19 }'
DOCUMENTATION: What are the different fields in "bpimagelist -l" output?
http://www.symantec.com/docs/TECH5584
09-21-2011 06:37 AM
thanks for the replys...
but i need the better options...i am aware of knowing the file size and image size....
may be i need to expline in better way...
let me take a example..
lets take it like this....i have a restore request for few directoris..having the hundered of files.. may be more than that....
(1)can not calculate the size of the files..as they are many ...(may suggesting any way can help)
.and these directories has been backed up from 4-5 different backup images...and images have other direcotires..that i dont what the restore
(2)so i can not take the image size as a data size that i am going to size.
so now.. i want to know the size of the directories that i am going to restore....
any help........
09-21-2011 06:38 AM
thank you.
09-21-2011 07:43 AM
bplist might be able to help you. bplist lists the files in the backup. You can specify which directories from which backup time frames you want to display. with some scripting you could automate the total size of all files in your listing.
09-21-2011 07:46 AM
Ahh I see. Well there is no out of the box functionality you can use. But if you do a little scripting you may archive the goal.
You can use bpflist - The command is only available on the master server and is undocumented. But there is a tech note about the usage :
Definition of each field in the bpflist command output
http://www.symantec.com/docs/TECH34317
The idea is that you either specify a backup image or a time frame to list the files. Use grep/findstr to find the files/directories in question. The technote above state field 14 is the files size (0 if a directory). You need to count the file size for each file to find a total.
bpflist can be a little tricky to use, but there are some examples here: http://www.mass.dk/netbackup/quick-hints/64-bpflist.html
bpflist: [-l | -L | -U] [-v]
[-M master_server...]
[-d mm/dd/yyyy HH:MM:SS][-e mm/dd/yyyy HH:MM:SS]
[-ut <unixtime for start and end date>]
[-st sched_type]
[-policy policy_name][-client client_name]
[-keyword "keyword phrase"][-pattern fullpath]
[-pt policy_type]
[-user name][-group name][-raw mode]
[-backupid name][-force_print]
[-psep path_separator_character]
[-malgo match_algorithm (0 1 2 or 3)]
[-rl recursion_level (0..999)]
[-option <list of:
NONE ONE_PASS NO_HSHAKE GET_ALL_FILES
INCLUDE_TIR ONLY_TIR ONLY_DIRS FILESYSTEM_ONLY
ONE_CONNECT INCLUDE_RAW_INCR INCLUDE_BITMAP INCLUDE_FSMAP
INCLUDE_EDI IGNORE_CASE INCLUDE_EFI>]
bpflist: -complete -policy policy_name [-client client_name][-st sched_type][-bt <unixtime>]
Valid values for sched_type:
FULL, INCR, CINC, UBAK, UARC, ANY, SCHED, USER, NOT_ARCHIVE
Valid values for policy_type:
Standard, Oracle, Informix-On-BAR, Sybase,
MS-SharePoint, NetWare, MS-Windows-NT,
OS/2, MS-SQL-Server, MS-Exchange-Server,
SAP, DB2, NDMP, FlashBackup, AFS, DataStore,
Lotus-Notes, FlashBackup-Windows, NBU-Catalog,
Generic, PureDisk-Export