How to catalog backup located on TAPE in RMAN?

If you are using Symantec Netbackup as a backup server, the following command will be useful for you:

1. To list available files located on tape taken by some client, run the following:

# /usr/openv/netbackup/bin/bplist -C r2n1 -t 4 -l -R /

where,

-C     client name
-t     is a policy type , where 4 means Oracle
-l     shows more details info
-R    recursively
/     root directory

–output

-rw-rw---- oracle oinstall 18939648K Aug 11 04:48 /al_dMEDIA_s3941_p1_t791009326_T20120811

2.  In my case this backuppiece is taken by r2n1 client and now I am cataloging it on orcl client. That’s why I need to pass additional parameters to channel. If these clients are the same , parameters are not necessary. (If you have some problem, like orcl can’t see r2n1’s backups see my post about alternate client)

RMAN> CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(NB_ORA_CLIENT=r2n1,NB_ORA_SERV=JUS-BACKUP01)';

RMAN> catalog device type 'SBT_TAPE' backuppiece 'al_dMEDIA_s3941_p1_t791009326_T20120811';

3. If you want to clear your configuration do the following,or skip this step.

CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' CLEAR;

That’s all, good luck!

Advertisement

Netbackup Restore by alternate client(Error: client is not validated to perform the requested operation)

Hello all,

If you have the following error “client is not validated to perform the requested operation” during restore, then you need to grant permission for the alternate client to access images other than it’s own.

Steps are the following:

1. Create a folder <Netbackup install path>\NetBackup\db\altnames.

2. If you want any client were able to restore any other clients backups, then create file named  “No.Restrictions”.(Note file name must not have any other extensions like .txt)

3. To grant one specified client a permission to browse and restore backups made by another client, create a file with the same name as the requesting client(with no extension like .txt) and write the name of the source client into the file.

Example: r2n1t should access r2n1 files:

Create folder C:\Program Files\Veritas\NetBackup\db\altnames
create file r2n1t and write r2n1 in it

That’s all.

ORA-19554, ORA-27211: Failed to load Media Management Library

Error text:

RMAN-03009: failure of allocate command on t1 channel at 03/30/2011 15:18:21
ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-27211: Failed to load Media Management Library
Additional information:2

Solution:

/usr/openv/netbackup/bin/libobk.so64 should have r-xr-xr-x

Or make link in $ORACLE_HOME/lib

cd $ORACLE_HOME/lib
ln -s /usr/openv/netbackup/bin/libobk.so64 libobk.so

Netbackup 7.0 client firewall setup

Question: What ports are needed for netbackup 7.0 client?

Answer: Netbackup 7.0 client will only need vnetd port 13724 to be opened and  bprd port 13720.(TCP ports)

 

Backup SQL Server 2008 using Symantec Netbackup 7.0(Windows)

Hello all,

Today we will discuss how to backup SQL Server 2008 using Symantec Netbackup.

It is assumed that Netbackup Server is installed and you already have set up connection between Master and Media servers. If it is so, let’s start.

First of all, you should install Netbackup Client on the server where SQL database is located.

Client Server Configuration

1. Download installation file from the internet(I will provide download link later)

2. Run Setup.exe

Click Next-> Check I agree….-> Next ->

image

enter Master Server Name

Let’s stop here! and add more actions before we do this.

* Add the following entries in C:\Windows\System32\drivers\etc\hosts

192.168.1.110  netBackupMaster

Master server ip and hostname .

Also you should have already opened connection between client server and master server (bidirectional TCP port 13724).

So my window look like this :

image

There may appear the window like this:

image

Click Yes –> Then Install-> Finish.

Prepare Backup Script

* Open  NetBackup MS SQL Client (Start->All Programs->Symantec NetBackup->NetBackup Agents).

* Fill the section Userid and Passwod for SQL Server Standard or Mixed Security with the correct credentials.

*From the menu bar choose File->Backup SQL Server objects

** select databases
**
choose Save instead of Launch immediately
**
click Backup, save the .bch file in your desired location.

Master Server Configuration

In NetBackup Server Administration Console go to the Clients-> in the menu bar Actions-> Configure Client->

image

Enter the ip address of the client, where SQL Server is installed.

In the Client Properties window  go to the section Servers –> Click first Add button and enter master server name(for me it will be netBackupMaster) , select entry in Additional servers  and click Make Master. After this you should see in  Master Server and Additional server  text boxes the name of the master you entered now.
In the section Client Name check if the value is correct. Click OK.

Create Backup Policy

In Policies->
* Attributes
** Policy type: MS-SQL-Server
* Schedules
** indicate your desired schedule
* Clients
** Click New button and enter ip or hostname  of the client, indicate its operating system…it is simple
* Backup Selection
** Click New button and find our created .bch script, click OK

Do Manual Backup to test it .

That is all.

In addition, create folder dbclient in C:\Program Files\Veritas\NetBackup\logs\ for troubleshooting purposes. There will be located log files, which is very useful for problem solving with Netbackup.

Setup netbackup to send mails

1. Installing and configuring BLAT 1.1 Download BLAT from here  http://sourceforge.net/projects/blat/ 1.2 Extract files, copy blat.exe and paste it into C:\Windows\System32 (indicate the correct path for your System32). 1.3 From the command line run the following:

> cd C:\Windows\System32
> blat -install <email server addr> <sender's addr>

Note: <sender’s addr> is the valid email account, which will be the primary sender of the email notifications. Example:

> blat -install mailserver.company.ge useraccount@company.ge

1.4 Testing the installation validity. Create a text file, for example, C:\textfile.txt with some text into it. And run the following from command line:

> blat C:\textfile.txt –s some_subject –to useraccount@company.ge

If blat is working,  useraccount@company.ge account should receive the mail. 2. Configuring nbmail.cmd script. 2.1 This script should be located in <install_path>\Veritas\NetBackup\bin , if not , go to the <install_path>\Veritas\NetBackup\bin\goodies and copy nbmail.cmd to <install_path>\Veritas\NetBackup\bin and then modify the script by the following way: For NetBackup 4.5 and 5.x systems find the following:

@rem @blat %3 -s %2 -t %1 -i NetBackup -server WARTHOG –q

For NetBackup 6.0 or 7.0 systems find the following:

@REM @IF "%~4"=="" (
@REM blat %3 -s %2 -t %1 -i NetBackup -server WARTHOG –q
@REM ) ELSE (
@REM blat %3 -s %2 -t %1 -i NetBackup -server WARTHOG -q -attach %4
@REM )

2.2 Remove all “@REM”. 2.3 Replace “WARTHOG” with the mail server name: For NetBackup 4.5 and 5.x systems find the following:

@rem @blat %3 -s %2 -t %1 -i NetBackup -server mailserver.company.ge –q

For NetBackup 6.0 or 7.0 systems find the following:

@REM @IF "%~4"=="" (
@REM blat %3 -s %2 -t %1 -i NetBackup -server mailserver.company.ge –q
@REM ) ELSE (
@REM blat %3 -s %2 -t %1 -i NetBackup -server mailserver.company.ge -q -attach %4
@REM )

3 Configure Netbackup to send mails to recipients.

3.1 Open Netbackup Administration Console We will use Master Servers and/or Clients properties under “NetBackup Management”-> “Host Properties”.

1. If you want NetBackup to send notification just  about Failed backups, do the following(just):

1.1 Write the mail address(or addresses, separated by commas) to where email notification should be sent  into “Master Servers” –> Properties –> “Global Attributes“->”Administrator email address“(It will cause Symantec to send mails about backups that ended with non-zero status)

2.  If you want to receive notifications about Failed and Successful backups as well, do the following:

2.1 Write the mail address(or addresses, separated by commas) to where email notification should be sent  into “Master Servers” –> Properties –> “Universal Settings” –> “Client Administrator’s email

and  check  “Server sends mail”(means server where netbackup is installed will send) or “Client sends mail”(if client, that is backed up, can send mails)….I prefer to check  “Server sends mail”.

2.2  Under  “Clients“->Properties –> “Universal Settings” check “Server sends mail”(if you’ve checked it in “Master Servers” –> Properties –> “Universal Settings”) or “Client sends mail”(if you’ve checked it in “Master Servers” –> Properties –> “Universal Settings”). So do the same for clients as you did  for master server, or it will fail.

and  in “Client Administrator’s email” write the mail address(or addresses, separated by commas) to where email notification should be sent.

That is all.