embedded file

42
DN00301944 © Nokia Corporation 1 (42) Issue 5-1 en Nokia Proprietary and Confidential Taking Backups of NetAct File Systems and Databases

Upload: sajid-shah

Post on 14-Sep-2014

206 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Embedded File

Taking Backups of NetAct FileSystems and Databases

DN00301944 © Nokia Corporation 1 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 2: Embedded File

Taking Backups of NetAct File Systems and Databases

The information in this documentation is subject to change without notice and describes onlythe product defined in the introduction of this documentation. This documentation is intendedfor the use of Nokia's customers only for the purposes of the agreement under which thedocumentation is submitted, and no part of it may be reproduced or transmitted in any form ormeans without the prior written permission of Nokia. The documentation has been prepared tobe used by professional and properly trained personnel, and the customer assumes fullresponsibility when using it. Nokia welcomes customer comments as part of the process ofcontinuous development and improvement of the documentation.

The information or statements given in this documentation concerning the suitability, capacity,or performance of the mentioned hardware or software products cannot be considered bindingbut shall be defined in the agreement made between Nokia and the customer. However, Nokiahas made all reasonable efforts to ensure that the instructions contained in the documentationare adequate and free of material errors and omissions. Nokia will, if necessary, explain issueswhich may not be covered by the documentation.

Nokia's liability for any errors in the documentation is limited to the documentary correction oferrors. NOKIA WILL NOT BE RESPONSIBLE IN ANY EVENT FOR ERRORS IN THISDOCUMENTATION OR FOR ANY DAMAGES, INCIDENTAL OR CONSEQUENTIAL(INCLUDING MONETARY LOSSES), that might arise from the use of this documentation orthe information in it.

This documentation and the product it describes are considered protected by copyrightaccording to the applicable laws.

NOKIA logo is a registered trademark of Nokia Corporation.

Other product names mentioned in this documentation may be trademarks of their respectivecompanies, and they are mentioned for identification purposes only.

Copyright © Nokia Corporation 2005. All rights reserved.

2 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 3: Embedded File

Contents

Contents 3

List of tables 4

1 About this document 5

2 Changes in NetAct documentation 7

3 NetAct compatibility and capacity information 9

4 Nokia NetAct file system and database backup 114.1 Nokia NetAct file system backup 124.1.1 Taking a backup 124.1.2 Scheduling a backup 134.1.3 Restoring the file system 134.2 Windows Application Server backup 154.2.1 Taking and restoring a backup of Windows Application Server with Data

Protector 5.5 154.2.2 Taking a backup of Windows Application Server with Data Protector 5.5

and Ntbackup 154.2.3 Restoring the file system to Windows Application Server 164.3 Node Manager Server backup 174.4 Nokia NetAct database backup 174.4.1 Taking an offline backup 174.4.2 Restoring an offline backup 194.4.3 Taking an online backup 204.4.4 Restoring an online backup 214.4.5 Restoring Oracle online backup when all control files have been lost 244.4.6 Exporting the entire Nokia NetAct database 284.5 Verifying previous night’s backups 294.6 Disaster recovery 294.6.1 Taking a backup of the root disks (Ignite/UX) 294.6.2 Recovering the root using recovery tape 304.6.3 Recovering the entire Nokia NetAct system 32

5 Where to find more 35

Appendix A. Performing control file backup and restore 37A.1 Backing up the control file to a physical file 37A.2 Restoring the control file to a physical file 37A.3 Backing up the control file to a trace file 38A.3.1 Scenario: Creating a trace file 38

Index 41

DN00301944 © Nokia Corporation 3 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 4: Embedded File

Taking Backups of NetAct File Systems and Databases

List of tables

Table 1. Export backup variable list 28

4 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 5: Embedded File

About this document

1 About this documentTaking Backups of NetAct File Systems and Databases is an Administerdocument for the system administrators of the Nokia NetAct. This documentincludes information about the procedures the system administrator needs to carryout to take and restore backups of the NetAct file systems and databases.

This document includes instructions on Windows Application Server backup.

This document may describe features that are not included in your softwarepackage.

DN00301944 © Nokia Corporation 5 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 6: Embedded File

Taking Backups of NetAct File Systems and Databases

6 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 7: Embedded File

Changes in NetAct documentation

Note

2 Changes in NetAct documentationThe information in this document relates to OSS3 releases and deliveries. Thisdocument is compatible with the latest release of NetAct and covers the necessaryrelease specific updates.

For information on the release specific changes in this document and the relatedsoftware changes, see Changes in NetAct Documentation.

If you are using a PDF print-out of this document and also need the changeinformation, please print out the Changes in NetAct Documentation(dn03511086) document.

DN00301944 © Nokia Corporation 7 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 8: Embedded File

Taking Backups of NetAct File Systems and Databases

8 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 9: Embedded File

NetAct compatibility and capacity information

3 NetAct compatibility and capacityinformation

For information on NetAct system and capacity, and the compatibility betweenNetAct and network element releases, see the NetAct Compatibility and CapacityInformation document.

DN00301944 © Nokia Corporation 9 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 10: Embedded File

Taking Backups of NetAct File Systems and Databases

10 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 11: Embedded File

Nokia NetAct file system and database backup

Note

4 Nokia NetAct file system and databasebackup

The following backup information only applies if you are using the BackupManager product as your Nokia NetAct backup system. The Backup Managerproduct is implemented with HP OpenView Data Protector 5.5 software on PC orUX.

It is highly recommended that you take regular backups of the system to avoiddata loss in case of a system failure. The backup frequency depends on the systemusage.

This chapter describes the procedures associated with taking and restoringbackups of the Nokia NetAct files and database. For more information on backupprinciples, refer to the Principles documents.

As a default, the Backup Manager has been configured to automatically takebackups of the file system and database, so carrying out the following backupprocedures manually is optional.

This chapter is divided into the following subsections:

• Chapter 4.1 Nokia NetAct file system backup

• Chapter 4.2 Windows Application Server backup

• Chapter 4.3 Node Manager Server backup

• Chapter 4.4 Nokia NetAct database backup

• Chapter 4.5 Verifying previous night’s backups

• Chapter 4.6 Disaster recovery

DN00301944 © Nokia Corporation 11 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 12: Embedded File

Taking Backups of NetAct File Systems and Databases

Note

Tip

4.1 Nokia NetAct file system backup

The following procedures explain how to take a manual backup of all file systems(full backup) and a manual backup of the files which have changed since the lastfull backup (incremental backup), how to schedule the full and incrementalbackup, and how to restore the file system from a backup.

4.1.1 Taking a backup

To take a backup of the file system

1. From the drop-down menu, select Backup, expand the Backup andBackup Specifications nodes in the navigation tree, select FileSystem andselect the desired backup specification.

2. Select Actions → Start Backup.

3. If you are taking a full backup of the file system, select Full in the BackupType drop-down menu.

4. If you are taking an incremental backup of the file system, selectIncremental in the Backup Type drop-down menu.

5. Select the desired network load level in the Network load drop-downmenu.

6. Click OK to start the backup.

A full file system backup includes all files except the database files.

If you do not use a backup LAN, we strongly recommend you select Medium loadwhen selecting the Network load, as that provides the best balance betweenperformance and the load on the network.

For more information on taking a backup of the file system manually, refer to theHP OpenView Data Protector 5.5 Administrator’s Guide.

12 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 13: Embedded File

Nokia NetAct file system and database backup

4.1.2 Scheduling a backup

To schedule a backup of the file system

1. From the drop-down menu, select Backup, expand the Backup andBackup Specifications nodes in the navigation tree, select FileSystem andselect the desired backup specification.

2. Click on the Schedule tab.

3. To use a predefined schedule click the Predefined... button, select thedesired Predefined schedule and go to step 7.

4. To create your own schedule, double-click on the day you want to schedulethe backup for in the calendar. Schedule Backup window opens.

5. In the Schedule Backup window, select the desired Recurring options,starting time, backup type and starting date (if applicable). Click OK whendone.

6. If you want to change the backup protection and network load options fora selected backup type, click the Options... button and make the desiredchanges.

7. Click Apply to bring the changes into effect.

For more information on the Nokia NetAct file system backup schedules, seechapter Configuring schedules in Installing and Configuring Backup Manager.For more information on scheduling a backup of the file system manually, referto the HP OpenView Data Protector 5.5 Administrator’s Guide.

4.1.3 Restoring the file system

To restore the file system from a backup

1. From the drop-down menu, select Restore and expand the Restore node inthe navigation tree.

2. Select the files and directories you want to restore from the desired host(s).

DN00301944 © Nokia Corporation 13 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 14: Embedded File

Taking Backups of NetAct File Systems and Databases

Note

Note

As a default, the latest versions of the selected files and directories arerestored. For instructions on how to restore earlier versions, see HPOpenView Data Protector 5.5 Administrator’s Guide.

If you are carrying out disaster recovery, you should not use the Overwritemode for the following directories:

• /etc

• /dev

• /var

Exclude these directories from restoration or use the Keep most recentmode.

If you plan to restore Oracle8 online backup(s) afterwards, you must notoverwrite Oracle8 control file(s) during this restoration process. Otherwise youwill lose some or all information needed for restoring the Oracle8 online backup.

3. Select the Destination tab and select the place where you want to restorethe file system to; the default destination is the place where the backup wastaken from. Select whether you wish to overwrite the files of the existingfile system when restoring, by selecting File Conflict Handling Menu →Overwrite.

4. Select the Options tab and ensure that the Restore protection attributesis selected if you wish to restore the protection attributes that were set forthe file system that is being restored. If you do not wish to restore thoseattributes, ensure that the Restore protection attributes is not selected.For information on other options, see HP OpenView Data Protector 5.5Administrator’s Guide.

5. Click on the Media tab and ensure that the desired media is selected forrestoring.

6. Select the Restore summary tab to ensure that everything is correct.

7. Click the Preview Restore button to test that the restoring is going to becarried out as desired.

For more information on restoring the file system from a backup, refer to HPOpenView Data Protector 5.5 Administrator’s Guide.

14 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 15: Embedded File

Nokia NetAct file system and database backup

Note

Note

4.2 Windows Application Server backup

Nokia recommends that you backup all the files, except the files in folderD:\Installdata.

It is not recommended to take a backup of the folder D:\Installdata, becauseit consists of third party software installation packages.

Nokia is not responsible for taking backups and restorations of Windows systemfiles.

You can take backups of the Windows Application Server by only using the DataProtector 5.5 software or by using both the Data Protector 5.5 software andNtbackup software. Ntbackup is included in all Windows servers.

If you use only the Data Protector 5.5 software, you can backup and restore filesthat are not related to the Windows system files. If you also want to backup filesthat are related to the Windows system you can use the Windows Ntbackup tooland route the backup file to the tape device by using the Data Protector 5.5software.

If you have problems with restoring backups related to Windows system files,refer to Microsoft documentation.

4.2.1 Taking and restoring a backup of Windows Application Server withData Protector 5.5

Refer to chapter 4.1 Nokia NetAct file system backup for instructions on how totake backups of the file system and how to restore the file system from the backupusing the Data Protector 5.5 software.

4.2.2 Taking a backup of Windows Application Server with Data Protector5.5 and Ntbackup

If it is necessary to take backups of files that are included in the Windows systemfiles, Ntbackup with the Data Protector 5.5 software can be used. The WindowsNtbackup tool can take backups of all files including the system files. The backuppackage can be routed to the tape device and back to the Windows server via DataProtector 5.5 Cell Manager.

DN00301944 © Nokia Corporation 15 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 16: Embedded File

Taking Backups of NetAct File Systems and Databases

To take a backup of Windows Application Server file system

1. Select Start → Run in the Windows user interface.

2. Write Ntbackup to the command line. Click OK.

3. In the Backup dialog, click Backup Wizard. Click Next.

4. Select Backup everything on my computer. Click Next.

5. Click the Browse button.

6. Select the folder where you want the backup to be created, for exampleD:\Backups\WAS_backup.bkf. Click Next.

7. Click Finish.

After the backup process is completed, you can save the backup file to the tapedevice. For instructions, refer to chapter 4.1 Nokia NetAct file system backup.

4.2.3 Restoring the file system to Windows Application Server

We recommend that if disaster recovery is needed, you install Windows from theinstallation CD and after that restore the other applications or files from thebackup file.

To restore the file system to Windows Application Server

1. Restore the Windows Application Server backup file from the tape asdescribed in chapter 4.1.3 Restoring the file system. You can restore it, forexample, to drive d:\backups.

2. Double-click the backup file to open the Windows Ntbackup tool.

3. Click Restore Wizard.

4. Click Next.

5. Select the file you want to restore. Click Next.

6. Click Finish.

For more information about using Ntbackup and restore situations with it, refer towww.microsoft.com.

16 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 17: Embedded File

Nokia NetAct file system and database backup

4.3 Node Manager Server backup

There is no need to take backups of the Node Manager Server. Typically, the GCSdatabase on the Node Manager Server is a replica of other databases. In 2Gnetworks it is populated automatically from the NetAct topology database withthe 2G Import tool. In 3G networks it is populated with Q1 Agent.

If the GCS database becomes corrupted, replace the corrupted dbs.mdb databasefile with a copy of the empty database (empty.mdb) made during the installationof the Node Manager Server and populate it again using 2G Import and Q1 Agent.

For information on how to back up the GCS database, see GeneralCommunication Service GCS R4.2 User Manual.

For more information on the Node Manager Server, see Administering NodeManager Server.

4.4 Nokia NetAct database backup

The following procedures explain how to manually take and restore an offline andonline backup of the Nokia NetAct database.

4.4.1 Taking an offline backup

Before taking an offline backup you must shut down the database.

You should also shut down Nokia NetAct for the duration of the backupoperation. This speeds up the backup procedure. The downtime which occurswhen the database is shut down due to backup can be avoided, if your system iscapable of disk mirroring. You can use the disk mirroring system to take anoffline backup by stopping the mirroring for all logical volumes which containdatabase components. This way the system can be restored to functional statewhile the data on the mirror disks is being packed up.

Offline backup of the database is usually taken after the installation of thedatabase and when changes that require shutdown have been made to thedatabase.

To take an offline backup of the Nokia NetAct database

1. Log into the database as root user.

2. Halt the database package by entering the following commands:

DN00301944 © Nokia Corporation 17 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 18: Embedded File

Taking Backups of NetAct File Systems and Databases

Tip

# cmhaltpkg db

# cd /etc/cmcluster/cmtools

# ./sgsdskmx.sh disown db

# ./sgsdskmx.sh -a mount db

3. From the drop-down menu, select Backup, expand the Backup andBackup Specifications nodes in the navigation tree and select FileSystem.

4. Select the desired backup specification.

As a default, offline backup includes the directories /d/db/oradata and/d/db01/oradata from the database server.

5. Open the Actions menu and select Start Backup. You may also test thatthe backup will run correctly by selecting Preview Backup instead.

6. Select Full in the Backup type pull-down menu.

7. Select the desired network load level in the Network load pull-down menu.

8. Click OK to start the backup.

9. After the backup process is completed, start up Oracle from the NokiaNetAct database server:

# ./sgsdskmx.sh -a umount db

# ./sgsdskmx.sh own db

# cmrunpkg -n <hostname_DB_server> db

If you do not use a backup LAN, we strongly recommend you select Medium loadwhen selecting the Network load, as that provides the best balance betweenperformance and the load on the network.

For more information on taking an offline backup, refer to the HP OpenViewData Protector 5.5 Administrator’s Guide.

18 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 19: Embedded File

Nokia NetAct file system and database backup

Note

4.4.2 Restoring an offline backup

To restore the Nokia NetAct database offline backup

1. Log into the database as root user:

2. Halt the database package by entering the following commands:

# cmhaltpkg db

# cd /etc/cmcluster/cmtools

# ./sgsdskmx.sh disown db

# ./sgsdskmx.sh -a mount db

3. Start the Data Protector graphical user interface.

4. From the drop-down menu, select Restore and expand the Restore node inthe navigation tree.

5. Select the files and directories you want to restore from the desired host(s).

If you took the default backup, the directories to be restored are/d/db/oradata and /d/db01/oradata.

If you are later going to restore something from the online backup(s) taken afterthe offline backup, note that the control files must not be overwritten whenrestoring the offline backup. Otherwise you are not able to restore from onlinebackups taken after the offline backup.

6. Select the Destination tab and select the place where you want to restorethe file system to; the default destination is the place from where thebackup was taken from. Select whether you wish to overwrite the files ofthe existing file system when restoring.

7. Select the Options tab and ensure that the Restore protection attributesis selected if you wish to restore the protection attributes that were set forthe file system that is being restored. If you do not wish to restore thoseattributes, ensure that the Restore protection attributes is not selected.For information on other options, see HP OpenView Data Protector 5.5Administrator’s Guide.

8. Select the Media tab and ensure that the desired media is selected forrestoring.

DN00301944 © Nokia Corporation 19 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 20: Embedded File

Taking Backups of NetAct File Systems and Databases

Note

9. Select the Restore summary tab to ensure that everything is correct.

10. Click the Preview Restore button to test that the restoring is going to becarried out as desired.

11. Start restoring.

12. After the restoring process is completed, start up Oracle from the NokiaNetAct database server:

# ./sgsdskmx.sh -a umount db

# ./sgsdskmx.sh own db

# cmrunpkg -n <hostname_DB_server> db

For more information on restoring an offline backup, refer to the HP OpenViewData Protector 5.5 Administrator’s Guide.

4.4.3 Taking an online backup

An online backup of the Nokia NetAct database can be taken while the databaseis running. This is the usual way to take a backup of the database.

To take an online backup of the Nokia NetAct database

1. From the drop-down menu, select Backup, expand the Backup andBackup Specifications nodes in the navigation tree and select FileSystem.

2. Select the desired backup specification from Oracle8Server.

3. If you want to change the schedule of the online backup, see instructions inchapter 4.1.2 Scheduling a backup.

4. If you want to take a default online backup, open the Actions menu andselect Start Backup.

5. Select Full in the Backup type pull-down menu.

6. Select the desired network load level in the Network load pull-down menu.

7. Click OK to start the online backup process.

When taking an online backup, the backup type must be set to Full.

20 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 21: Embedded File

Nokia NetAct file system and database backup

Tip

If you do not use a backup LAN, we strongly recommend you select Medium loadwhen selecting the Network load, as that will provide the best balance betweenperformance and the load on the network.

For more information on taking an online backup, refer to the HP OpenView DataProtector 5.5 Administrator’s Guide.

4.4.4 Restoring an online backup

The online backup restoration must be carried out by using Oracle8 RecoveryManager, it cannot be done by using Data Protector.

To restore an online backup of the Nokia NetAct database

1. Log in to the Nokia NetAct Database Server as root user.

2. Shut down the database and mount the database disks:

# cmhaltpkg db

# cd /etc/cmcluster/cmtools

# ./sgsdskmx.sh disown db

# ./sgsdskmx.sh -a mount db

3. Mount the ossetc global disk. The disk can be found from /etc/hosts,for example:

# more /etc/hosts

# mount rc42sys:/d/ossetc /m/ossetc

4. Activate IP addresses of the database server. Check the right interfaces andhexadecimal number, for example:

# netstat -rn

# ifconfig [interface]

# ifconfig lan2:5 10.8.51.212 netmask 0xffffff80

5. Log into the Nokia NetAct Database Server as oracle user.

DN00301944 © Nokia Corporation 21 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 22: Embedded File

Taking Backups of NetAct File Systems and Databases

6. Start sqlplus with command sqlplus '/as sysdba' and enter thefollowing commands:

SQL>startup nomount

SQL>exit

7. Start Recovery Manager:

# $ORACLE_HOME/bin/rman target “sys/<password_for_sys>” nocatalog

8. To restore the latest online backup, write the following restore script in theRecovery Manager command prompt:

RMAN> run {

2> allocate channel ‘dev_0’ type ‘sbt_tape’

3> parms ‘ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=oss)’;

4> allocate channel ‘dev_1’ type ‘sbt_tape’

5> parms ‘ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=oss)’;

6> sql “alter database mount”;

7> restore database;

8> recover database;

9> sql “alter database open”;

22 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 23: Embedded File

Nokia NetAct file system and database backup

Note

Note

10> }

If you want to restore some other online backup than the latest one, you canrestore the backup by replacing the date_string, for example “23.11.2002” withthe following commands:

run {

allocate channel 'dev_0' type 'sbt_tape'

parms 'ENV=(OB2BARTYPE=ORACLE8,OB2APPNAME=oss)';

allocate channel 'dev_1' type 'sbt_tape'

parms 'ENV=(OB2BARTYPE=ORACLE8,OB2APPNAME=oss)';

sql "alter database mount";

set until time = 'date_string';

restore database;

recover database;

sql "alter database open resetlogs";

sql "alter database open";

}

Refer to Oracle8i Recovery Manager Users Guide and Reference for moreexamples about restoring online backups.

To see when on-line backups have been taken, enter:

RMAN> list backupset of database;

RMAN>Exit;

9. Shut down the database with the command sqlplus /'as sysdba':

SQL>shutdown immediate;

SQL>exit

10. Restart the database as root user on the database server, for example withthe following commands:

# ifconfig lan2:5 0.0.0.0

DN00301944 © Nokia Corporation 23 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 24: Embedded File

Taking Backups of NetAct File Systems and Databases

# umount /m/ossetc

# cd /etc/cmcluster/cmtools

# ./sgsdskmx.sh -a umount db

# ./sgsdskmx.sh own db

# cmrunpkg -n <dbserver> db

By default, the latest on-line backup is restored and recovered. After the abovescript is completed, the database should be running. For more information onrestoring data, refer to Oracle8 Backup and Recovery Guide.

4.4.5 Restoring Oracle online backup when all control files have been lost

This chapter gives instructions on how to restore an online backup of the Oracledatabase in case all Oracle8 control files have been lost.

To restore an online backup of the Oracle database

1. To restore online backups, a control file containing information about theonline backups is needed. In each file system the backup includes a dumpcopy of the control file, taken before the file system backup.

The file name and location of the dump file is/db01/app/oracle/admin/<$ORACLE_SID>/udump/cf_<$ORACLE_SID>.bak.

Restore the dump file from the backup tape by using the Data Protectorgraphical user interface. Refer to Data Protector 5.5 Administrator’sGuide for more information on restoring files.

2. Examine the init<$ORACLE_SID>.ora file to see where the control filesof the database are located and copy a dump control file over each controlfile. Make sure that the database is down when copying the files. Here is anexample of restoring OSS database instance control files as oracle user:

# cp /d/db01/app/oracle/admin/oss/udump/cf_oss.bak/d/db01/oradata/oss/control01.ctl

# cp /d/db01/app/oracle/admin/oss/udump/cf_oss.bak/d/db/oradata/oss/control02.ctl

# cp /d/db01/app/oracle/admin/oss/udump/cf_oss.bak/d/db/oradata/oss/control03.ctl

3. Start up the database without mounting the disks. Give the commandsqlplus /'as sysdba'

24 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 25: Embedded File

Nokia NetAct file system and database backup

SQL>startup nomount

SQL>exit

4. Start up Oracle Recovery Manager as oracle user:

# $ORACLE_HOME/bin/rman target “sys/<password_for_sys>@<ORACLE_SID>”nocatalog

5. Restore the latest database on-line backup by using the following RMANscript:

RMAN> run {

2> allocate channel ‘dev_0’ type ‘sbt_tape’

3> parms ‘ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=oss)’;

4> allocate channel ‘dev_1’ type ‘sbt_tape’

5> parms ‘ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=oss)’;

6> sql “alter database mount”;

7> restore database;

8> recover database;

9> sql “alter database open RESETLOGS”;

10> release channel ‘dev_0’;

11> release channel ‘dev_1’;

DN00301944 © Nokia Corporation 25 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 26: Embedded File

Taking Backups of NetAct File Systems and Databases

Note

Note

12> }

If you want to restore an earlier database on-line backup with point-in-timerestoration, you can restore the backup by replacing the date_string, for example“23.11.2002” with the following commands:

run {

allocate channel 'dev_0' type 'sbt_tape'

parms 'ENV=(OB2BARTYPE=ORACLE8,OB2APPNAME=oss)';

allocate channel 'dev_1' type 'sbt_tape'

parms 'ENV=(OB2BARTYPE=ORACLE8,OB2APPNAME=oss)';

sql "alter database mount";

set until time = 'date_string';

restore database;

recover database;

sql "alter database open resetlogs";

sql "alter database open";

}

RMAN>Exit;

Restoring should pass OK. Although the recovery of the database fails, that is theexpected result and does not affect the outcome of this procedure.

6. Create a control file trace script. Give command sqlplus /'assysdba':

SQL>ALTER DATABASE BACKUP CONTROLFILE TO TRACE;

SQL>EXIT;

The trace file is placed in/d/db01/app/oracle/admin/<$ORACLE_SID>/udump/.

7. Open the trace file for editing.

26 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 27: Embedded File

Nokia NetAct file system and database backup

Comment out the first 16 lines of the trace file, they contain only generalinformation about the file.

If restoring some other than the latest on-line backup, edit the followingline:

RECOVER DATABASE

Change it to:

RECOVER DATABASE UNTIL <TIME>

Use the same <TIME> value as used in step 5.

8. Shut down Oracle as oracle user:

% $ORACLE_HOME/bin/svrmgrl

SVRMGR> connect internal

SVRMGR> shutdown immediate

9. Give execute permissions to the trace file:

% chmod +x <name_of_tracefile, for example, ora_14141_oss.trc>

10. Run the trace file to recreate control files and recover database:

% ./ora_14141_oss.trc

The database should now be up and running. All information in controlfiles concerning previously taken on-line backups is lost during the laststep. If some other database on-line backup dating before the control filefailure needs to be restored later, restoring has to be started from the firststep.

11. Shut down the database:

% $ORACLE_HOME/bin/svrmgrl

SVRMGR> connect internal

SVRMGR> shutdown immediate

SVMGR> exit

12. Restart the database as root user on the database server:

# cd /etc/cmcluster/cmtools

# ./sysdskmx.sh -a umount db

# ./sysdskmx.sh own db

# cmrunpkg -n <dbserver> db

DN00301944 © Nokia Corporation 27 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 28: Embedded File

Taking Backups of NetAct File Systems and Databases

4.4.6 Exporting the entire Nokia NetAct database

The Backup Manager is the primary means for backing up Nokia NetActdatabases. Using Oracle's Export utility for taking a backup of the database willbe necessary if for some reason the Backup Manager is unavailable or if you wantto transfer data between databases that are not connected via a network. For acomplete description of the Export/Import utilities refer to Oracle8 Utilitiesmanual.

To export the entire database

1. Log into the database server as oracle user.

2. Check the space available on the Nokia NetAct disks with the followingcommand:

bdf -l

Select the directory or media where the database export file and log file willbe created.

3. To take the export backup enter the following command:

exp system/<password> file=<export_directory>/<filename.dmp> \

log=<export_directory>/<logfilename.log> full=y buffer=500000 \

statistics=none

4. You can copy the export file on a tape media after the export has beencompleted and delete the original export file.

Table 1. Export backup variable list

<password> The SYSTEM database user’s password

<export_directory> The directory where the export file willbe saved

<filename.dmp> The name of the export file, for examplefullexp.dmp

<logfilename.log> The name of the export log file. This isnot mandatory

28 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 29: Embedded File

Nokia NetAct file system and database backup

Note

5. If the Export utility is the only backup method, the archived redo log filesin the /opt/oracle/app/oracle/admin/omc/arc directory must bemanually deleted at least once a week. If you use the Backup Manager, thearchived redo log files are automatically deleted after the backup.

4.5 Verifying previous night’s backups

You should check daily that the automatic online backup on a tape has beensuccessful. The steps to take to ensure this depend on the operating environmentof Backup Manager.

4.6 Disaster recovery

This chapter describes how to recover from a situation where one or more disks,including the root disk, are damaged. It is assumed that a full backup for the entiresystem has been taken by using Nokia NetAct backup system or the entire systemcan be restored otherwise.

In case of a single disk failure - either data or root disk - it is typically notnecessary to restore any data from the backup media because of disk mirroring.The instructions do not cover a situation where a disk array system has a total diskfailure. In such a case, contact Nokia Customer Support.

We recommend that if Windows Application Server disaster recovery is needed,you install Windows from the installation CD and after that restore the otherapplications or files from the backup file.

This chapter is divided into the following subsections:

• Chapter 4.6.1 Taking a backup of the root disks (Ignite/UX)

• Chapter 4.6.2 Recovering the root using recovery tape

• Chapter 4.6.3 Recovering the entire Nokia NetAct system

4.6.1 Taking a backup of the root disks (Ignite/UX)

The root volume group has to be backed up on each server of Nokia NetActseparately.

DN00301944 © Nokia Corporation 29 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 30: Embedded File

Taking Backups of NetAct File Systems and Databases

Note

To take a backup of the root disk

1. Make sure you have Ignite/UX software installed on your servers.

# swlist | grep Ignite

2. Insert the DDS tape to your local DDS drive and type the followingcommand to create a bootable image of the root disk.

# make_tape_recovery -v -x inc_entire=vg00

No errors should occur while running the command.

By default, the make_tape_recovery tool uses the tape with the device file/dev/rmt/0mn. If your system has a different configuration, you have to specifythe destination, for example:

# make_tape_recovery -v -x inc_entire=vg00 -a/dev/rmt/1mn

4.6.2 Recovering the root using recovery tape

The following steps have to be performed on a Nokia NetAct server to which theroot file system has to be reinstalled.

To recover the root using recovery tape

1. Restart the server by turning off the power and turning it back on again.

2. Insert the bootable DDS tape (created with Ignite/UX, see chapter4.6.1 Taking a backup of the root disks (Ignite/UX)) into the DDS drive ofthe server and boot from the tape.

3. Interrupt the boot sequence after the system selftest by pressing any key,then enter the following information:

MAIN > BOOT <H/W_path_of_tape_device>

Interact with IPL > N

30 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 31: Embedded File

Nokia NetAct file system and database backup

Note

The machine is booted from the tape and the root volume group is restored to theroot disk. The system reboots after the reinstallation of the root disk.

Note that root mirroring will not retain, therefore the mirroring has to be recreatedafter the installation.

To create a mirror copy of the root volume group

1. Log in as root user.

2. Prepare the new disk for use with volume management:

# vgreduce /dev/vg00 /dev/dsk/<root_mirror_device_file>

# pvcreate -f -B /dev/rdsk/<device_file>

3. Make the new disk bootable:

# mkboot -l /dev/rdsk/<device_file>

# mkboot -a “hpux -lq (;0)/stand/vmunix” /dev/rdsk/<device_file>

Notice that there is a blank space between ‘hpux -lq’ and the openingbracket.

4. Extend the existing volume group vg00 with the new disk:

# vgextend -g scsi<x_y> /dev/vg00/dev/dsk/<device_file>

5. Find out for which logical volumes the mirroring has to be installed:

# vgdisplay -v vg00 | grep ‘logical_volume_name’

6. Set the strict flag for the individual volume groups so that the volumegroups will really use a distinct disk to do the mirroring:

# lvchange -s g /dev/vg00/<lvol_name>

# ...

7. Create a mirrored copy for all logical volumes on the new disk:

# lvextend -m 1 /dev/vg00/<lvol_name> /dev/dsk/<mirror_device_name>

# ...

DN00301944 © Nokia Corporation 31 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 32: Embedded File

Taking Backups of NetAct File Systems and Databases

8. Update BDRA and LABEL area:

# lvlnboot -b /dev/vg00/lvol1

# lvlnboot -s /dev/vg00/lvol2

# lvlnboot -d /dev/vg00/lvol2

# lvlnboot -r /dev/vg00/lvol3

# lvlnboot -R

9. Check that the disk has been added to the root volume group:

# lvlnboot -v

10. Remove old volume group definitions. For example:

# rm /dev/db

# rm /dev/db01

4.6.3 Recovering the entire Nokia NetAct system

To recover the entire Nokia NetAct system

1. Install new hardware (if needed).

2. Restore the root disk either by using the Ignite/UX (see chapter 4.6.2Recovering the root using recovery tape) or by installing the operatingsystem from a CD.

3. Recreate the volume groups and logical volumes if necessary (for instance,when all the disks are new or changed). The general procedure for this isas follows:

1. Partitioning and mirroring disks

2. Creating volume groups and logical volumes with or without SAM

3. Importing volume group settings to other servers

4. Reinstall Data Protector.

5. Restore the Data Protector database.

32 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 33: Embedded File

Nokia NetAct file system and database backup

6. Restore the Nokia NetAct file system backup. The file system restorationalso includes the Oracle8 off-line backup, and you must be careful that theexisting Oracle8 control files are not overwritten (if there are any). If youhave configured the volume groups, you must not overwrite the files in the/etc and /dev directories. On MC/ServiceGuard environment you shouldensure that the cluster is not active when recreating and/or importing thevolume groups; when the root disk is restored by the Ignite/UX, theMC/ServiceGuard configuration already exists.

7. Restore the Oracle control files. The database must be down whenrestoring the control files. The control file backup was restored from thetape during the previous step; to restore the control file copies, just copythe backed up files into the original control file locations:

# cp /d/db01/app/oracle/admin/<$ORACLE_SID>/udump/cf_<$ORACLE_SID>.bak/d/db01/oradata/<$ORACLE_SID>/control01.ctl

# cp /d/db01/app/oracle/admin/<$ORACLE_SID>/udump/cf_<$ORACLE_SID>.bak/d/db/oradata/<$ORACLE_SID>/control02.ctl

# cp /d/db01/app/oracle/admin/<$ORACLE_SID>/udump/cf_<$ORACLE_SID>.bak/d/db/oradata/<$ORACLE_SID>/control03.ctl

8. Restore the Oracle8 online backup. This requires that at least one controlfile still exists somewhere, otherwise it is not possible to restore the onlinebackup. This is because all file set information needed for restoring anonline backup is stored to a control file, not in the Data Protector catalog.See/d/db01/app/oracle/admin/<$ORACLE_SID>/pfile/initoss.ora, entry control_files for information on control file locations ondisk.

9. Reboot the system.

For more information, contact the Nokia Technical Support.

DN00301944 © Nokia Corporation 33 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 34: Embedded File

Taking Backups of NetAct File Systems and Databases

34 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 35: Embedded File

Where to find more

5 Where to find moreWhen you perform the tasks described in this document, you may need to refer toother documentation for further information. The document list below containsuseful documents and a brief description of their contents.

Nokia NetAct documents

• For information on installing and configuring Nokia NetAct’s BackupManager, see Installing and Configuring Backup Manager.

• For information on system management concepts, principles, and systemmanagement applications for Nokia NetAct, refer to the Principlesdocuments.

• For information on hardware, the NetAct file and directory structure, theNetAct applications and processes, configuration files, and optionalfeatures, refer to Technical Reference Guides.

• If you are unfamiliar with any of the concepts or abbreviations in thisdocument, see Glossary.

Hewlett Packard documents

• For more information on HP OpenView Data Protector 5.5, visit HPOpenView Product Manuals web site athttp://ovweb.external.hp.com/lpe/doc_serv/.

Microsoft documents

• For more information on Microsoft Ntbackup, visit Microsoft web site athttp://www.microsoft.com.

Oracle documents

• For more information on Oracle8i backup and recovery, visit Oracle website at http://www.oracle.com.

DN00301944 © Nokia Corporation 35 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 36: Embedded File

Taking Backups of NetAct File Systems and Databases

36 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 37: Embedded File

Performing control file backup and restore

Appendix A. Performing control file backup and restore

It is advisable to back up the control file of a database after making a structuralmodification to a database operating in ARCHIVELOG mode. To back up thecontrol file of a database you must have the ALTER DATABASE system privilege.

A.1 Backing up the control file to a physical file

The primary method for backing up the control file is to use an SQL statement togenerate a binary file.

Back up the database control file. The following SQL statement backs up adatabase control file to/d/db01/app/oracle/admin/<$ORACLE_SID>/udump/cf_<$ORACLE_SID>.bak:

ALTER DATABASE BACKUP CONTROLFILE TO‘d/db01/app/oracle/admin/<$ORACLE_SID>/udump/cf_<$ORACLE_SID>.bak’ REUSE;

The REUSE option allows the new control file to overwrite a currently existingcontrol file.

This is done automatically before every NetAct file system backup by a pre-exec script. The cf_<$ORACLE_SID>.bak file is then backed up in everyNetAct file system backup.

A.2 Restoring the control file to a physical file

To restore a control file copy, just copy the backed up file into the original controlfile locations:

cp/d/db01/app/oracle/admin/<$ORACLE_SID>/udump/cf_<$ORACLE_SID>.bak /d/db01/oradata/oss/control01.ctl

cp/d/db01/app/oracle/admin/<$ORACLE_SID>/udump/cf_<$ORACLE_SID>.bak /d/db/oradata/oss/control02.ctl

DN00301944 © Nokia Corporation 37 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 38: Embedded File

Taking Backups of NetAct File Systems and Databases

Note

Note

cp/d/db01/app/oracle/admin/<$ORACLE_SID>/udump/cf_<$ORACLE_SID>.bak /d/db/oradata/oss/control03.ctl

The database must be closed when restoring the control file(s).

Remember that you must restore the database file backups as well.

A.3 Backing up the control file to a trace file

The TRACE option of the ALTER DATABASE BACKUP CONTROLFILE statementhelps you to manage and recover your control file. The TRACE option promptsOracle to write the SQL statements to the database trace file rather than generatea physical backup. The statements in the trace file start the database, re-create thecontrol file, and recover and open the database appropriately.

Each SQL statement in the trace file is commented. Therefore you can copy thestatements from the trace file into a script file, edit them as necessary, and use thescript to recover the database if all copies of the control file are lost (or to changethe value of control file parameters such as MAXDATAFILES). The trace file islocated in the location specified by the USER_DUMP_DEST initializationparameter (normally/d/db01/app/oracle/admin/<$ORACLE_SID>/udump). It is probably thelatest one.

To back up the control file to a trace file, mount the database and issue thefollowing statement:

ALTER DATABASE BACKUP CONTROLFILE TO TRACE;

A.3.1 Scenario: Creating a trace file

Assume that you want to generate a script that re-creates the control file for theOSS database.

You issue the following statement to create the trace file:

ALTER DATABASE BACKUP CONTROLFILE TO TRACENORESETLOGS;

38 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 39: Embedded File

Performing control file backup and restore

You then edit the trace file to create a script. This script creates a new control filebased on the control file that was current when you generated the trace file. Toavoid recovering offline normal or read-only tablespaces, omit them from theCREATE CONTROLFILE statement. At database open time, the dictionarycheck code will mark these files as MISSING. The RENAME statement renamesthem back to their file names.

For example, the script might read as follows:

Dump file /d/db01/app/oracle/admin/oss/udump/ora_12026_oss.trc

Oracle8i Enterprise Edition Release 8.1.7.1.0 - Production

JServer Release 8.1.7.1.0 - Production

ORACLE_HOME = /d/db01/app/oracle/product/8.1.7

System name:HP-UX

Node name:popper

Release:B.11.00

Version:E

Machine:9000/785

Instance name: oss

Redo thread mounted by this instance: 1

Oracle process number: 11

Unix process pid: 12026, image: oracle@popper (TNS V1-V3)

*** SESSION ID:(10.545) 2001-05-16 11:28:16.935

*** 2001-05-16 11:28:16.934

# The following commands will create a new control file and use it

# to open the database.

# Data used by the recovery manager will be lost. Additional logs may

# be required for media recovery of offline data files. Use this

# only if the current version of all online logs are available.

STARTUP NOMOUNT

CREATE CONTROLFILE REUSE DATABASE “OSS” NORESETLOGS NOARCHIVELOG

MAXLOGFILES 32

MAXLOGMEMBERS 2

MAXDATAFILES 254

MAXINSTANCES 8

MAXLOGHISTORY 907

LOGFILE

GROUP 1 ‘/d/db01/oradata/oss/redooss01.log’ SIZE 100M,

GROUP 2 ‘/d/db01/oradata/oss/redooss02.log’ SIZE 100M,

GROUP 3 ‘/d/db01/oradata/oss/redooss03.log’ SIZE 100M,

GROUP 4 ‘/d/db01/oradata/oss/redooss04.log’ SIZE 100M,

GROUP 5 ‘/d/db01/oradata/oss/redooss05.log’ SIZE 100M

DATAFILE

‘/d/db/oradata/oss/system01.dbf’,

‘/d/db/oradata/oss/tools01.dbf’,

‘/d/db/oradata/oss/rbs01.dbf’,

‘/d/db/oradata/oss/temp_sort01.dbf’,

‘/d/db/oradata/oss/temp01.dbf’,

‘/d/db/oradata/oss/users01.dbf’,

‘/d/db/oradata/oss/indx01.dbf’

CHARACTER SET WE8ISO8859P1

;

DN00301944 © Nokia Corporation 39 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 40: Embedded File

Taking Backups of NetAct File Systems and Databases

Note

# Recovery is required if any of the datafiles are restored backups,

# or if the last shutdown was not normal or immediate.

RECOVER DATABASE

# Database can now be opened normally.

ALTER DATABASE OPEN;

# No tempfile entries found to add.

If the control file(s) have been lost totally, they can still be rebuilt:

1. Edit the Backup Trace File:

• remove all the lines before STARTUP NOMOUNT

2. Create control file by using the Backup Trace File:

• sqlplus /nolog

• connect internal

• @Backup_Trace_file

• exit

Creating a control file manually is a rare situation that should NOT BE USEDunless asked by the Nokia Support.

40 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en

Page 41: Embedded File

IndexB

backup frequency 11backup LAN 12, 18, 21Backup Manager 11, 28, 29backup types 20backups

export variable list 28verifying previous night s 29

C

control filebacking up to a physical file 37backing up to a trace file 38restoring to a physical file 37

control files 19

D

Data Protector 19, 21, 32database backups

restoring offline 19restoring online 21taking offline 17taking online 20

database backups 17database server 28databases

exporting entire 28restoring offline backup of 19restoring online backup of 21taking offline backup of 17taking online backup of 20

Disaster Recovery 29disk failure 29disk mirroring 17

F

file system backup 12file system backups

restoring 13scheduling 13

file systemstaking a backup of 12

full backupsscheduling 13taking 12

full backups 12

G

group definitionsremoving 32

H

HP OpenView Data Protector 5.5 11

I

Ignite UX 30, 32incremental backups

scheduling 13taking 12

incremental backups 12Installdata 15

L

lib -86447 -div -17 17logical volumes 17, 31, 32

M

MC ServiceGuard 21MG ServiceGuard 33

N

network load 12, 18, 21Node Manager Server backup 17Nokia NetAct Database Server 21Ntbackup 16

O

offline backupsrestoring 19taking 17

online backupsrestoring 21taking 20

Oracle 18, 20Oracle s Export utility 28Oracle8 control files 33Oracle8 Recovery Manager 21

R

recovering entire system 32

DN00301944 ©Nokia Corporation 41 (42)Issue 5-1 en Nokia Proprietary and Confidential

Page 42: Embedded File

Taking Backups of NetAct File Systems and Databases

Recovery Manager 22root disk failure 29root disks

recovering from recovery tape 30taking backup of 29

S

SAM 32SQL 37

T

trace filecreating 38

V

volume groups 32volume management 31

W

Windows Application Serverbackup 15Data Protector 5.5 15disaster recovery 16, 29Ntbackup 15restoring the file system 16taking a backup and restoring with Data Protector

5.5 15taking a backup with Data Protector 5.5 and

Ntbackup 15Windows Appliction Server 15Windows system files 15

42 (42) © Nokia Corporation DN00301944Nokia Proprietary and Confidential Issue 5-1en