Hi All,
Thought of sharing a list of FAQs about tape import that I compiled from different sources & in-house tests. Hope it helps!
Q: We have 2 media, NBU001 and NBU002.
NBU001 contains 2 fragments:
winsrv_1234567890
unixsrv_1320000000 (first fragment)
NBU002 contains 3 fragments:
unixsrv_1320000000 (second fragment)
unixsrv_1320000000 (third fragment)
websrv_1331000000
What happens if NBU001 is forcefully expired by running "bpexpdate -m NBU001 -d 0" ?
A: Both winsrv_1234567890 and unixsrv_1320000000 backups will be expired along with it. This is despite unixsrv_1320000000 having some fragments on another tape.
Q: How do we perform phase 1 and phase 2 import using NetBackup GUI?
A: http://www.symantec.com/business/support/index?page=content&id=TECH72429
Q: What does phase 1 import do?
A: It physically reads the tape, grabs the header of each fragment it finds on the tape, check if catalog information exists for the backup mentioned in the fragment, and if not, it will re-create the backup header information within NetBackup. The header of an imported backup contains fragment information, media ID, tape offset, etc.
Phase 1 import is always done per tape. You have to specify the media ID to perform phase 1 import. It is generally quite fast, as it only read the backup header of each fragment. All backups that are recreated using phase 1 import will have IMAGE_TYPE equal to 1.
Q: What does phase 2 import do?
A: Phase 2 import relies on the header information generated by phase 1 import.
After phase 1 is done, you can search for backup images eligible for phase 2 import (in the background, NetBackup will search for images with IMAGE_TYPE equal to 1). Phase 2 import starts by locating fragment one, mounts the corresponding tape and read the tape content block by block to generate the backup metadata (i.e. the file structure that you see in the backup). It does the same process for the rest of the fragments listed in the backup header.
Unlike phase 1, phase 2 import is not done per tape. It is done per backup image. You can do phase 2 import for just one image, multiple images, or even all eligible images in one shot (and just leave it running until all images are imported). The actual finish time depends on the number of tape drives, tapes, file structure, among other things. It is usually slow.
Q: What is the retention period of imported backups?
A: Imported backup will have the same retention period of original backup. If original backup retention is 1 year, imported backup will expire 1 year from the first time the header file gets generated (via phase 1 import).
Q: I have a regular backup that has 10 fragments, consuming 10 tapes (one fragment per tape). I successfully performed phase 1 import against tape 1 to 8. Tape 9 and 10 are lost. In the backup header, the fragment is sequential (1, 2, 3, 4, 5, 6, 7, 8).
Will phase 2 import work? If it doesn't, how does NetBackup know the last fragment is missing?
A: The above scenario will usually work for backup that doesn't use True Image Restore (TIR) information. NetBackup will happily mount the tape where fragment 1 resides, generate metadata information, continues with fragment 2, and so on until fragment 9. Import phase 2 will complete with status 0.
In this case, you may still be able to perform restore against the imported backup, but bear in mind that the backup doesn't have the entire data.
Phase 2 import of backups that use TIR information, such as FlashBackup, FlashBackup-Windows and NDMP backups will not work at all.
The last fragment in NDMP backup is always TIR fragment, and naturally, it resides on the last tape. If the last tape is missing, phase 2 import will fail almost immediately even if all other fragments exist and sequential (including fragment 1).
When the last tape (with the TIR fragment) is imported successfully, the TIR fragment will be put at the top of the fragment list (fragment number = -1). This information is again recorded in the backup header.
# FRAG: c# f# K rem mt den fn id/path host bs off md dwo f_flags desc exp mpx rl chkpt rsm_nbr seq_no media_subtype keep_date copy_date fragment_state data_format slp_index_num
FRAGMENT 1 -1 902 0 2 14 2 ADI001 mediasrv 65536 3035 1372483813 7 0 *NULL* 0 0 0 0 0 0 1 0 0 1 0 0
FRAGMENT 1 1 193963 512 2 14 1 ADI001 mediasrv 65536 2 1372483813 7 0 *NULL* 1373693413 1 65537 0 0 0 1 0 1372484639 1 3 0
Backup header information can be obtained by running: <Install Dir>\NetBackup\bin\cat_export -client <clientname>
Or if you know the backup ID, run: <Install Dir>\NetBackup\bin\cat_export -backupid <backupid>
The output is located in <Install Dir>\NetBackup\db.export\
Recommendation:
The best approach to importing tapes is to first do phase 1 against all known tapes. This will minimize hiccups during phase 2 import.