Showing posts with label NetBackup. Show all posts
Showing posts with label NetBackup. Show all posts

Friday, 1 March 2013

BIND DNS: reverse delegation of IP range

Besides mapping domain name to IP address, DNS systems can also map IP address to domain name. Many applications rely on DNS reverse mapping to function properly.
NetBackup will throw error if reverse mapping is not setup or is setup incorrectly, email system also needs correct reverse mapping.

Suppose we have the whole range of IP addresses in 222.222.222.0/24, we can configure reverse mapping in named.conf:

zone "222.222.222.in-addr.arpa" {
    type master;
    file "222.222.222.rev";
};

If we only have part of the IP addresses in 222.222.222.0/24, suppose 222.222.222.64 to 222.222.222.91, the reverse mapping is called classless reverse delegation.

From 222.222.222.64 to 222.222.222.95 there are 30 usable addresses, plus the network and broadcast address, there are 32 addresses, 32 = 2^5, 8 x 4 - 5 = 27. so our IP range can be represented as 222.222.222.64/27

ISP should have defined reverse delegation in their reverse zone file:
64/27    IN    NS    ns.sg.linuxscripter.blogspot.com

Now we can define the reverse mapping for our IP range in our own named.conf:
zone "64/27.222.222.222.in-addr.arpa" {
    type master;
    file "64-95.222.222.222.rev";
};
Note: The domain name and IP addresses in this post are dummy ones, I use them for easier writing.

Wednesday, 21 March 2012

NetBackup: how to restore oracle backup to a different server

Production environment is running on RAC, prod1 and prod2 are the cluster members.
We need to restore the production data to a testing server test1 for application testing, if test1 uses the same NetBackup master and media servers, we can restore the data using this rman code
set dbid = 1234567890;
connect target /
connect catalog rmanid/rmanpass@rmancatalog

RUN {
allocate channel c1 type 'SBT_TAPE' parms 'ENV=(NB_ORA_CLIENT=prod1)' maxopenfiles 10;
allocate channel c2 type 'SBT_TAPE' parms 'ENV=(NB_ORA_CLIENT=prod2)' maxopenfiles 10;
set until time "TO_DATE('2012-03-21 12:30:00', 'YYYY-MM-DD HH24:MI:SS')";
restore controlfile;
sql 'alter database mount';
restore database;
recover database;
release channel c1;
release channel c2;
 }

But if we try the restore directly, we will get this error:
ERROR: client is not validated to perform the requested operation.

Before restoration, we have to allow test1 to restore from the backup made on prod1 and prod2. To do this, you need log on to the backup master server. In directory /usr/openv/netbackup/db/altnames, create a file named test1, in file test1, put prod1 and prod2 as the content.

$ cat /usr/openv/netbackup/db/altnames/test1
prod1
prod2
$