Video Screencast Help

catalog recovery

Created: 31 Aug 2013 • Updated: 06 Sep 2013 | 15 comments
This issue has been solved. See solution.

Hi ALL,

 

Please can anybody provide me the steps or documentation of:

  • Doing a complete catalog recovery when I have no DR file.no email  and I dont know on which tapes my catalog backup ran.I have 200 tapes with me onsite.

 

 

NBU 7.1

Linux

 

Thanks in advance

Zoan

Washington DC

Operating Systems:

Comments 15 CommentsJump to latest comment

mph999's picture
With knowing the media, or having the DR file there is no way to tell which is the catalog tape.  You will have to 'inspect' each one.
 
http://www.symantec.com/docs/HOWTO72613
 
From the TN, you would have to run this command on each tape.  It will inspect the contents and import any that have a catalog backup
 
bpimport -drfile -id <media_id> -drfile_dest <fully_qualified_dir_name>
 
Martin

 

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
Nicolai's picture
Better call in professional Symantec consultant to evaluate the problem. 
 
If the Netbackup installation is still assessable go to :
 
<install_path>\VERITAS\NetBackup\db\jobs\trylogs\
 
Below that directory are .t files where each file represent a job. By using the linux command "strings" and "grep" you should be able to see what tape the catalog backup used last time it ran.

Assumption is the mother of all mess ups.

If this post answered your'e qustion -  Please mark as a soloution.

zoan_nbu's picture

@Martin:

With knowing the media, or having the DR file there is no way to tell which is the catalog tape.  You will have to 'inspect' each one.

 

1.  I dont know the media id as well.

2. You will have to 'inspect' each one.What this means?

3.Can I run phase one and phase 2  import on each tape?

mph999's picture

You run the command 

bpimport -drfile -id <media_id> -drfile_dest <fully_qualified_dir_name>

Eg. Create a dir called /catinfo

For each tape ...

bpimport -drfile -id tape01 -drfile_dest /catinfo

bpimport -drfile -id tape02 -drfile_dest /catinfo

bpimport -drfile -id tape03 -drfile_dest /catinfo

 

As Nicolai suggested, if you have accress to the try logs on the server you are trying to recover.

/usr/openv/netbackup/db/jobs/trylogs

You cold look in here to see if you can find a catalog backup.

cd /usr/openv/netbackup/db/jobs/trylogs

grep <catalog backup policy name> *

If anything comes up, look in the file reported to see the tape media id.

Martin

 

 

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
zoan_nbu's picture

I am going with below:

 

You run the command 

bpimport -drfile -id <media_id> -drfile_dest <fully_qualified_dir_name>

Eg. Create a dir called /catinfo

For each tape ...

bpimport -drfile -id tape01 -drfile_dest /catinfo

bpimport -drfile -id tape02 -drfile_dest /catinfo

bpimport -drfile -id tape03 -drfile_dest /catinfo

 

What after arunning all the above commands on each medai

then i have to go to /catinfo directory?

Dyneshia's picture

For the DR file : http://www.symantec.com/docs/TECH47797

DOCUMENTATION: How to re-create the DRFile (the catalog disaster recovery file) when recovery from a hot (online) catalog backup is necessary and this file is not available.
mph999's picture

Yes, you look in the catnfo dir and you should see the DR files. The ctme in the filename will tell you the date of the backup
bpdbm -ctime will convert to readable format.

The TN posted by Dyneshia woud also work, but you still have to import the media to find the catalog tape if the image db is not available,

 

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
Mark_Solutions's picture

When did you last catalog backup run?

If the original site still exists can you see the Catalog Backup policy?

If you can see th epolicy take a look at the Disaster Recovery tab to see where the DR files are stored and then go to that location, find the most recent dr file, open it with notepad and it will tell you which tape it used

Tell us as much about things and why you cannot find anything

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

zoan_nbu's picture

original site does not exist.

 

i dont know on which tape my catalog backup are and not the location of dr file too.

Mark_Solutions's picture

OK - no e-mails in the system either which would have the details and DR file attached?

If not you will just need to work through all the tapes using an import until you find the latest one

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

StefanosM's picture

I just finish a case like this.

If you do not need a restore, your first and easiest option is to start from the beginning, dropping all previous backups. If you do not need a restore, I suggest you to consider it as your best option.

 

The only solution to your problem is to read the start of the tapes and create an excel document with the tapes, the date of the first backup, the possible pool  and the possible clients (guessing from the name of the policy and schedule).

After that you can short the tapes by date and with that you can find the latest catalog tape or , at least, the latest master server's file backup (if you have one) and import them.

then you can use the recreation of the DR file to recover netbackup as mentioned on other posts or , if you cannot find the catalog tape, to use the recovery without import method (as you are on 7.1) using the master’s server file backup..

the bigger problem is that you cannot stop the phase one import when you started it. And phase one import can take from 1 hour (if the tape is empty) to several hours (if the tape is full).
What I did is to start the phase one import only to read the start of the tape using all drives and when I capture the information of the tapes I restart the master server to stop the import. Then continue with the next bunch of tapes.

With our case, we calculated (with tests) that a complete phase one of 20 tapes using two drives would take 6 tapes per day (24x7), total  4 days, and with the above method we found the catalog tape within 3 hours.
Finally we did not found any catalog tape (catalog was not configured) and we proceed with recovery without import.

 

I suggest you to get a consultant.

 

 

mph999's picture

No need for a consultant for this.  It's not difficult, just time consuming.

StefanosM method could work, if you read just the tape header, you could narrow down the tapes to those that only contain backups of the master server, you would have to read the media header, and skip through to the backup header.  Then use my previous method on this reduced set of tapes.

 

As it is on linux, it's easy :

Put tape in drive (this can be automated through robtest) 

 

eg

[root@nbmedia00 openv]# echo 'm s2 d1' |tldtest -r /dev/sg2
Opening /dev/sg2
MODE_SENSE complete
Enter tld commands (? returns help information)
Initiating MOVE_MEDIUM from address 1025 to 1
MOVE_MEDIUM complete
 

(eg. echo m s1 d1 |tldtest -d

Use dd 'piped' into od -c x3 times to read the backup header

 

[root@nbmedia00 openv]# dd if=/dev/nst0 bs=1024 count=1 |od -c
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.001062 seconds, 964 kB/s
0000000   V   O   L   1   E   0   1   0   0   2  \0  \0  \0  \0  \0  \0
0000020  \0  \0  \0  \0  \0  \0  \0 001  \0  \0  \0 006   R 024 206 376
0000040  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000060  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 001
0000100  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 004  \0  \0  \0  \0  \0
0000120  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0000160   T   h   I   s       I   s       A       B   P       t   A   p
0000200   E       h   E   a   D   e   r  \0  \0  \0  \0  \0  \0  \0  \0
0000220  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0002000
[root@nbmedia00 openv]# dd if=/dev/nst0 bs=1024 count=1 |od -c
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000858 seconds, 0.0 kB/s
0000000
[root@nbmedia00 openv]# dd if=/dev/nst0 bs=1024 count=1 |od -c
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.00111 seconds, 923 kB/s
0000000  \0  \0  \0 002   n   b   m   e   d   i   a   0   0   _   1   3
0000020   7   7   0   7   6   9   9   0  \0  \0  \0  \0  \0  \0  \0  \0
0000040  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0000200  \0  \0  \0  \0   R 024 206 376   R 035 301   ~  \0  \0  \0  \0
0000220  \0  \0  \0 001  \0  \0  \0 001  \0 001  \0  \0  \0  \0  \0  \0
0000240   E   0   1   0   0   2  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000260  \0  \0  \0 002  \0  \0  \0  \0  \0  \0  \0 001  \0  \0  \0  \0
0000300  \0  \0  \0  \0  \0  \0  \0  \0   T   h   I   s       I   s
0000320   A       B   P       B   a   C   k   U   p       H   e   A   d
0000340   E   r  \0   s   l   p  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000360  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0000540  \0  \0  \0  \0   F   u   l   l  \0  \0  \0  \0  \0  \0  \0  \0
0000560  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
 
 
In this example, the backupid is :
 
nbmedia00_1377076990
 
Martin

 

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
zoan_nbu's picture

@Mark:I have to run import on all  200 tapes.

 

only phase 1 in needed?

it will create direcory of each client.and i have to check the policy with name as catalog

 

am i correct?

Mark_Solutions's picture

If you have done a phase 1 of all 200 tapes then go to the catalog section - select import at the top - put a very wide date range in and hit the search button

Then look for the tapes that did a catalog backup - that will tell you which is the latest catalog tape - then run the command listed earlier to create your DR file

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

SOLUTION
StefanosM's picture

If you already HAVE run a phase one import to your tapes, then go with Marks post.

If you do NOT have done the phase one yet, then be prepared. The time you will neen for a complete phase one import is unpredictable.
And  you must know that if the backup is spanning tapes, you have to do the phase one import to all the tapes that the backup is on them.