31
AAA V200R002C11 Backup and Recovery Guide Issue 10 Date 2013-03-15 HUAWEI TECHNOLOGIES CO., LTD.

AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

Embed Size (px)

DESCRIPTION

AAA Backup and Recovery Guide

Citation preview

Page 1: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

AAA

V200R002C11

Backup and Recovery Guide

Issue 10

Date 2013-03-15

HUAWEI TECHNOLOGIES CO., LTD.

Page 2: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

Copyright © Huawei Technologies Co., Ltd. 2013. All rights reserved.

No part of this document may be reproduced or transmitted in any form or by any means without prior writtenconsent of Huawei Technologies Co., Ltd. Trademarks and Permissions

and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.All other trademarks and trade names mentioned in this document are the property of their respective holders. NoticeThe purchased products, services and features are stipulated by the contract made between Huawei and thecustomer. All or part of the products, services and features described in this document may not be within thepurchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information,and recommendations in this document are provided "AS IS" without warranties, guarantees or representationsof any kind, either express or implied.

The information in this document is subject to change without notice. Every effort has been made in thepreparation of this document to ensure accuracy of the contents, but all statements, information, andrecommendations in this document do not constitute a warranty of any kind, express or implied.

Huawei Technologies Co., Ltd.Address: Huawei Industrial Base

Bantian, LonggangShenzhen 518129People's Republic of China

Website: http://www.huawei.com

Email: [email protected]

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

i

Page 3: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

About This Document

PurposeThis document describes how to perform the data backup and recovery, and the logical backupand recovery of the AAA.

Intended AudienceThe intended audience of this document is:

Maintenance engineer

Symbol ConventionsThe symbols that may be found in this document are defined as follows.

Symbol Description

DANGERIndicates an imminently hazardous situation which, if notavoided, will result in death or serious injury.

WARNINGIndicates a potentially hazardous situation which, if notavoided, could result in death or serious injury.

CAUTIONIndicates a potentially hazardous situation which, if notavoided, may result in minor or moderate injury.

TIP Indicates a potentially hazardous situation which, if notavoided, could result in equipment damage, data loss,performance deterioration, or unanticipated results.NOTICE is used to address practices not related topersonal injury.

AAABackup and Recovery Guide About This Document

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

ii

Page 4: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

Symbol Description

NOTE Calls attention to important information, best practices andtips.NOTE is used to address information not related topersonal injury, equipment damage, and environmentdeterioration.

Update HistoryUpdates between document issues are cumulative. Therefore, the latest document issue containsall updates made in previous issues.

Issue 10 (2013-03-15)

1.2.1 Configuration Guide is added.

Issue 09 (2012-01-20)l 1.2.2 Automatically Backing Up Service Data is added.

l 1.2.3 Manually Backing Up Service Data is added.

l 2.1 Overview is added.

Issue 08 (2011-06-09)l Backing Up All Database Tables is updated.

l 2.3 Recovering All Database Tables is updated.

Issue 07 (2011-02-28)

Backing Up the AAA Operating System Data is updated.

Restoring the AAA Operating System Data is updated.

Issue 06 (2010-03-31)

Add informix database in 2.5 Recovering Databases Logically.

The product version V200R002 is changed to R002C10.

Issue 05 (2009-09-30)

The product name infoX AAA is changed to HUAWEI AAA.

Issue 04 (2009-01-09)

The product name infoX-AAA is changed to infoX AAA.

AAABackup and Recovery Guide About This Document

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

iii

Page 5: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

Issue 03 (2008-12-10)Modify test questions.

Issue 02 (2008-11-15)Guidelines for using the tape drive that connects to the USM server is added.

Issue 01 (2008-06-20)Initial commercial release.

AAABackup and Recovery Guide About This Document

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

iv

Page 6: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

Contents

About This Document.....................................................................................................................ii

1 Guidelines for Backing Up Data................................................................................................11.1 Overview........................................................................................................................................................................21.2 Backing Up Service Data...............................................................................................................................................21.2.1 Configuration Guide....................................................................................................................................................21.2.2 Automatically Backing Up Service Data.....................................................................................................................31.2.3 Manually Backing Up Service Data............................................................................................................................4

2 Guidelines for Recovering Data...............................................................................................122.1 Overview......................................................................................................................................................................132.2 Combined Recovery.....................................................................................................................................................132.3 Recovering All Database Tables..................................................................................................................................132.4 Recovering Specified Database Tables........................................................................................................................142.5 Recovering Databases Logically..................................................................................................................................152.6 Recovering Configuration Files....................................................................................................................................182.7 Recovering Bill Files....................................................................................................................................................19

A Introduction to the Backup and Recovery Tool....................................................................20

B Introduction to the Tape Drive................................................................................................22B.1 Rules for Using the Tape Drive...................................................................................................................................23B.2 Guidelines for Using the Tape Drive...........................................................................................................................23

C Acronyms and Abbreviations..................................................................................................25

AAABackup and Recovery Guide Contents

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

v

Page 7: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

1 Guidelines for Backing Up Data

About This Chapter

This chapter describes the guidelines for backing up data, such as databases, configuration files,and bill files.

NOTE

All passwords in this document are examples. Change them based on your site scenario. Before the systembecomes commercial, change the passwords according to the AAA password change guide.

1.1 OverviewThis section describes the rule and cycles of backup.

1.2 Backing Up Service Data

AAABackup and Recovery Guide 1 Guidelines for Backing Up Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

1

Page 8: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

1.1 OverviewThis section describes the rule and cycles of backup.

Backup Rule and CyclesThe backup must be fast and effective.

The recommendations for the backup cycle of each type of data are as follows:l Databases: Perform a level 0 backup once a day. That is, back up all the data in the database

once a day.l Bill files: Back up the bill files once a day.l Configuration files: Back up the configuration files once a day.

1.2 Backing Up Service Data

1.2.1 Configuration GuideThis topic describes how to configure the backup tool.

Procedure

Step 1 Log in to the server where the iSMS or iSCC application is located as the root user.

Step 2 Open the ~AAATools/backup/config.ini file.

NOTE

In the path, ~ indicates the installation path of the system. The default installation path is /export/home/.

For example, The itellindb and SYS passwords setting is as follows:ORACLE_ITELLINDB_NAME=itellindb #Oracle username of itellindbORACLE_SYS_PASSWD=58996B2724AF909A055330414ECCAB4D #password of system in sysdb instanceORACLE_BILLDB_NAME=billdb #Oracle username of billdbORACLE_BILL_PASSWD=10D009F50C3068ADA9F1A3449DF74303 #password of system in billdb instanceORACLE_SYS_NAME=SYS #Oracle username of SYSORACLE_SYSDB_SYS_PSWD=3A2073DF46BC2664DDE5D3BDDE7D9019 #Oracle SYS passwd (dual system)ORACLE_BILLDB_SYS_PSWD=6192E36032D5934E4F99F1344389F90F #Oracle SYS passwd (dual system)ORACLE_SINGLE_SYS_PSWD=3A2073DF46BC2664DDE5D3BDDE7D9019 #Oracle SYS passwd (single system)

NOTE

Before executing the backup script, check whether the password under itellindb and SYS is the same asthe password in the ~/AAATools/autoinstall/inst_aaa.cfg file.

For example, The DBTYPE setting is as follows:#DataBase type.default value is oracle.DBTYPE=ORACLE

AAABackup and Recovery Guide 1 Guidelines for Backing Up Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2

Page 9: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

NOTE

For the Oracle database, set DBTYPE to ORACLE.

For the Informix database, set DBTYPE to INFORMIX. Before executing the backup policy, verify thatthe DBTYPE value is the same as the database type.

Step 3 Configure tables to be filtered out during full backup in the ~AAATools/backup/tablesnotbackup.cfg file.A setting example is as follows:operator_logc280_callstatusaccessresultrecord

The operator_log table is set by default.

NOTE

l If no table name is configured, all tables are backed up.

l For Oracle 9i, this function is not supported.

l For Oracle 11g, the specified tables are filtered out during backup in binary mode, and only their tablestructures are backed up. Therefore, only the table structures can be restored.

l For Oracle 11g, no data is backed up for the specified tables during backup in text mode.

----End

1.2.2 Automatically Backing Up Service DataThis section describes how to configure a scheduled task to back up the service data manually.

Automatic backup varies according to network architecture.

l Two-node cluster deployment

When the AAA is successfully deployed in a two-node cluster, the backup script isautomatically added to crontab. The backup task is executed at 03:00 each day. Thescheduled task backs up only database information related to itellindb and does notconfigure backup configuration files and CDR files.

To back up Billdb, configuration files, and CDR files, add a crontab scheduled taskmanually. You are advised to back up configuration files and CDR files manually. Theprocedure is as follows:

1. Log in to the server as the root user.

2. Access the directory for storing the backup script.

backup script default path: ~AAATools/backup

In the ~AAATools/backup path, the symbol ~ represents the installation path of thesystem. The installation path is /export/home/ by default.

3. Run the crontab -e command.

4. Add information about the scheduled task.

For example, to add the task for backing up configuration files automatically at 04:00each day, add the following information to crontab:00 3 * * * /export/home/AAATools/autoinstall/../backup/backup.sh -c > /dev/null 2>&1

AAABackup and Recovery Guide 1 Guidelines for Backing Up Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3

Page 10: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

NOTE

For details about the backup script, access the directory for storing the script on the server and runthe backup.sh -h command.

l Distributed deployment

– Database two-node cluster

In the database two-node cluster, the scheduled task for backing up database informationis added to crontab. The task backs up only data related to itellindb. To back up Billdb,configuration files, and CDR files, create a scheduled task manually.

– iSMS two-node cluster

In each node of the iSMS two-node cluster, create a crontab scheduled task for backingup configuration files automatically.

– iSCP node

In each iSCP node, create a crontab scheduled task for backing up configuration filesautomatically.

backup script default path: ~AAATools/backup

In the ~AAATools/backup path, the symbol ~ represents the installation path of the system.The installation path is /export/home/ by default.

NOTICEIf the backup script is used for backup, the default duration for executing the backup script isthree hours (10800 seconds). If the backup duration exceeds three hours because the backupprocess is slow or a larger amount of data needs to be backed up, backup engineers must modifymonitor_time in the ~AAATools/backup/config.ini file to ensure that the backup is completenormally.

1.2.3 Manually Backing Up Service DataThis section describes how to manually use the backup script to manually back up service data.

Manual backup varies according to network architecture.

l Two-node cluster deployment

When the AAA is deployed in a two-node cluster, run the backup script on the serversrunning iscc or isms.

l Distributed deployment

When the AAA is deployed in distributed mode, run the backup script in the database two-node cluster, iSMS two-node cluster, and each iSCP node.

In database two-node cluster, the script backup database date, configuration files of iSCC1,configuration files of FEP, bill files of iSCC1 and bill files of FEP.

In iSMS two-node cluster, the script backup configuration files of MML Server,configuration files of WMAS, configuration files of Billproc, configuration files of SMPand bill files of Billproc.

In each iSCP node, the script backup configuration files of iSCP and bill files of iSCP.

AAABackup and Recovery Guide 1 Guidelines for Backing Up Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4

Page 11: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

NOTICEThis section describes how to back up service data when the AAA is deployed in a two-nodecluster.If the backup script is used for backup, the default duration for executing the backup script isthree hours (10800 seconds). If the backup duration exceeds three hours because the backupprocess is slow or a larger amount of data needs to be backed up, backup engineers must modifymonitor_time in the ~AAATools/backup/config.ini file to ensure that the backup is completenormally.

Combined BackupThis section describes how to perform the combined backup, that is, how to back up multipletypes of data at the same time.

The backup and recovery tool of the AAA supports the combined backup. To perform thecombined backup, an operator needs to add the command parameters for backing up thecorresponding data to the backup command. The following describes the command parametersof the data to back up.

For example, you can back up the billdb database, configuration files, and bill files by runningthe backup.sh -B -c -bf command.

To perform the combined backup, note the following points:l In the preceding command, -B indicates all the database tables of the billdb database; -c

indicates the configuration files; -bf indicates the bill files.l To back up the sysdb and billdb databases at the same time, make sure that the iscc and

isms applications coexist on the same server.l The specified database tables cannot be backed up with other data at the same time.l The specified database tables of the sysdb database cannot be backed up together with the

specified database tables of the billdb database.

Backing Up All Database TablesThis section describes how to back up table databese in service database which includes sysdbdatabase and itellindb database and bill database. The service database sysdb belongs to Oracledatabase and the service database itellindb belongs to Informix database. The bill databasebelongs to Oracle database and Informix database.

Task DescriptionThis task helps you to back up the data of the service database or bill database, such as the recordsof all the database tables, table structure, and SQL statements for creating the databasetables ,indexes,stored procedures and functions.

AAABackup and Recovery Guide 1 Guidelines for Backing Up Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5

Page 12: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

NOTE

To backup the databases, note the following points:

l Back up the service database on the server where the iscc application is located.

l Back up the bill database on the server where the isms application is located.

l See the introduction to the backup and recovery tool in A Introduction to the Backup and RecoveryTool.

Procedurel To back up all the database tables of the service database, do as follows:

1. Log in to the server where the iscc application is located as user root.2. Access ~AAATools/backup.

NOTE

In the ~AAATools/backup path, the symbol ~ represents the installation path of the system.The installation path is /export/home/ by default.

3. Back up the database.# ./backup.sh -l

NOTE

The -l parameter in the command indicates backing up all database tables.

After backup, the AAABackup.tar.Z backup package is generated in ~AAATools/backup.The package contains the table data and SQL statements for creating all the database tablesof the sysdb database. See the path of the file after backup in A Introduction to the Backupand Recovery Tool.

l To back up all the database tables of the bill database, do as follows:1. Log in to the server where the isms application is located as user root.2. Access ~AAATools/backup.3. Back up the database.

# ./backup.sh -B

NOTE

The -B parameter in the command indicates the database tables of the bill database.

After backup, the AAABackup.tar.Z backup package is generated in ~AAATools/backup.The package contains the table data and SQL statements for creating all the database tablesof the bill database. See the path of the file after backup in A Introduction to the Backupand Recovery Tool.

----End

Backing Up Specified Database TablesThis section describes the function of backing up specified database tables and how to back upthe specified database tables of the service database and bill databases.

Task DescriptionThis task helps you to back up the specified database tables. The data of the database tables tobe backed up includes the records, table structures, and SQL statements for creating databasetables ,indexes,stored procedures and functions.

AAABackup and Recovery Guide 1 Guidelines for Backing Up Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6

Page 13: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

The purposes of backing up the specified database tables are as follows:l To prevent the database table from being deleted or corruptedl To back up the database table containing a large amount of data independently

Before backing up the specified database tables, prepare the table files. The table files containthe names of the database tables to be backed up. Store the table files in ~AAATools/backup.

The names of the table files can be set. The format of a table file is as follows:Table1Table2Table3........

NOTE

To back up specified database tables, note the following points:

l Back up the service database on the server where the iscc application is located.

l Back up the bill database on the server where the isms application is located.

l See the introduction to the backup and recovery tool in A Introduction to the Backup and RecoveryTool.

Procedurel To back up the specified database tables of the service database, do as follows:

1. Log in to the servers where the iscc application is located as user root.2. Access ~AAATools/backup.3. Back up the database tables.

# ./backup.sh -s filename

After the backup, the AAABackup.tar.Z backup package is generated in ~AAATools/backup. The package contains the records and SQL statements for creating the specifieddatabase tables of the sysdb database.

l To back up the specified database tables of the bill database, do as follows:1. Log in to the server where the isms application is located as user root.2. Access ~AAATools/backup.3. Back up the database.

# ./backup.sh -b filename

After the backup, the AAABackup.tar.Z backup package is generated in ~AAATools/backup. The package contains the records and SQL statements for creating the specifieddatabase tables of the sysdb database.

----End

Backing Up Databases LogicallyThis section describes the function of logical backup and how to logically back up the servicedatabase and bill databases.

Task DescriptionThis task helps you to logically back up the data of all the database tables, such as records andtable structures, SQL statements for creating the database tables and indexes, and logic logs of

AAABackup and Recovery Guide 1 Guidelines for Backing Up Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7

Page 14: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

the databases. The logic logs of the databases record all the operations performed since thedatabase was created.

NOTE

To logically back up the databases, note the following points:

l Logically back up the service database on the server where the iscc application is located.

l Logically back up the bill database on the server where the isms application is located.

l See the introduction to the backup and recovery tool in A Introduction to the Backup and RecoveryTool.

Procedurel To logically back up the service database, do as follows:

1. Log in to the server where the iscc application is located as user root.2. Access ~AAATools/backup.3. Run the following command to logically back up the database.

# ./backup.sh -L

NOTE

The -L parameter in the command indicates the logical backup.

After the backup, the detailed results are as follows:

– Informix databaseAfter the backup, the AAABackup.tar.Z backup package is generated in ~AAATools/backup. The package contains one or more itellin_online_net.tape.vn (n = 1, 2, 3, ...)backup files. The data such as logic logs and database tables are stored in the backupfiles in binary mode.

NOTE

The number of backup files inthe AAABackup.tar.Z backup package is subject to the capacityof the database.

– Oracle databaseAfter the backup, the AAABackup.tar.Z backup package is generated in ~AAATools/backup.

l To logically back up the bill database, do as follows:1. Log in to the server where the isms application is located as user root.2. Access ~AAATools/backup.3. Logically back up the database.

# ./backup.sh -L -B

NOTE

In the command, the -L parameter indicates the logical backup and the -B parameter indicatesthe bill database.

After the backup, the detailed results are as follows:

– Informix databaseAfter the backup, the AAABackup.tar.Z backup package is generated in ~AAATools/backup. The package contains one or more itellin_online_net.tape.vn (n = 1, 2, 3, ...)and bill_online_net.tape.vn (n = 1, 2, 3, ...) backup files. The data such as logic logsand database tables are stored in the backup files in binary mode. If an operator logically

AAABackup and Recovery Guide 1 Guidelines for Backing Up Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8

Page 15: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

backs up only the billdb database, the itellin_online_net.tape.vn (n = 1, 2, 3, ...) filesis empty.

NOTE

The number of backup files in the AAABackup.tar.Z backup package is subject to the capacityof the database.

– Oracle databaseAfter the backup, the AAABackup.tar.Z backup package is generated in ~AAATools/backup.

----End

Backing Up Configuration FilesThis section describes how to back up configuration files of each module of the AAA.

Task DescriptionThis task helps you to back up the configuration files, license files, and service files of eachmodule of the AAA.

The configuration files that the backup script backs up are listed as follows:l iSCC1

All files in ~/iscc1/config~/iscc1/.cshrc

l iSCC2All files in ~/iscc2/config~/iscc2/.cshrcAll files in ~/iscc2/servicerun~/iscc2/bin/licensefile.lic

l FEPAll files in ~/fep/config~/fep/.cshrc

l SMP~/smp/smp_run/cfg/inetcfg.cfg~/smp/.cshrc~/smp/smp_run/bin/licensefile.lic

l MMLServerAll files in ~/ismpmml/sms_run/cfgAll files in ~/ismpmml/sms_run/shell~/ismpmml/.cshrcAll files in ~/ismpmml/sms_run/license~/ismpmml/sms_run/license/license.lic

l BillprocAll files in ~/billproc/config

AAABackup and Recovery Guide 1 Guidelines for Backing Up Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9

Page 16: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

~/billproc/.cshrcl WMAS

~/websmap/apps/WEB-INF/conf/wss.cfg~/websmap/apps/WEB-INF/conf/ftp.ini~/websmap/.cshrc

The purposes of backing up the configuration files are as follows:l To back up all the files and data that are used for running the AAA with the database backupl To recover the AAA by providing only the backup files and working with the Breeze

To back up the configuration files, note the following points:l If the AAA is deployed in a two-node cluster, back up the configuration files on the server

where the iscc application is located and the server where the isms application is located.l If the AAA is deployed in distributed mode, run the backup script in the database two-node

cluster, iSMS two-node cluster, and each iSCP nodes.l See the introduction to the backup and recovery tool in A Introduction to the Backup and

Recovery Tool.

Procedure

Step 1 Log in to the server as user root.

Step 2 Access ~AAATools/backup.

NOTE

In the ~AAATools/backup path, the symbol ~ represents the installation path of the system. The installationpath is /export/home/ by default.

Step 3 Back up the configuration files.# ./backup.sh -c

NOTE

The -c parameter in the command indicates the configuration files.

After backup, the AAABackup.tar.Z backup package is generated in ~AAATools/backup. Thepackage contains the configuration file of each module.

----End

Backing Up Bill FilesThis section describes how to back up the bill files in the AAA.

Task DescriptionThis task helps you to back up all the bill files in the AAA.

NOTE

To back up the bill files, note the following points:

l Back up the bill files on the server where the isms application is located.

l See the introduction to the backup and recovery tool in A Introduction to the Backup and RecoveryTool.

AAABackup and Recovery Guide 1 Guidelines for Backing Up Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

10

Page 17: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

Procedure

Step 1 Log in to the server as user root.

Step 2 Access ~AAATools/backup.

Step 3 Run the following command to back up the bill files.# ./backup.sh -bf

NOTE

The -bf parameter in the command indicates backup the bill files.

After backup, the AAABackup.tar.Z backup package is generated in ~AAATools/backup.

----End

AAABackup and Recovery Guide 1 Guidelines for Backing Up Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

11

Page 18: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

2 Guidelines for Recovering Data

About This Chapter

This chapter describes the guidelines for recovering lost data.

2.1 Overview

2.2 Combined RecoveryThis section describes how to perform the combined recovery, that is, how to recover multipletypes of data at the same time.

2.3 Recovering All Database TablesThis section describes how to recover all the database tables of the service database and billdatabases.

2.4 Recovering Specified Database TablesThis section describes how to recover specified database tables.

2.5 Recovering Databases LogicallyThis section describes how to logically recover the service and bill databases.

2.6 Recovering Configuration FilesThis section describes how to recover configuration files.

2.7 Recovering Bill FilesThis section describes how to recover bill files.

AAABackup and Recovery Guide 2 Guidelines for Recovering Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

12

Page 19: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

2.1 Overview

The restore operation is executed when an exception occurs in an office.

NOTICETo restore data, contact Huawei maintenance engineers.

2.2 Combined RecoveryThis section describes how to perform the combined recovery, that is, how to recover multipletypes of data at the same time.

The backup and recovery tool of the AAA supports the combined recovery. To perform thecombined recovery, an operator needs to add the command parameters for recovering thecorresponding data. The following describes the command parameters of the data to recover.

For example, you can recover the billdb database, configuration files, and bill files by runningthe restore.sh -B -c -bf command.

NOTE

To perform the combined recovery, note the following points:

l In the preceding command, -B indicates all the database tables of the billdb database; -c indicates theconfiguration files; -bf indicates the bill files.

l To recover the sysdb and billdb databases at the same time, make sure that the iscc and ismsapplications coexist on the same server.

l The specified database tables cannot be recovered with other data at the same time.

l The specified database tables of the sysdb database and the specified database tables of the billdbdatabase cannot be recovered at the same time.

2.3 Recovering All Database TablesThis section describes how to recover all the database tables of the service database and billdatabases.

Task DescriptionThis task helps you to recover all the database tables of the service database and bill database.

AAABackup and Recovery Guide 2 Guidelines for Recovering Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

13

Page 20: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

NOTE

To recover the database tables, note the following points:

l Recover the database tables of the service database on the server where the iscc application islocated;Recover the database tables of the bill database on the server where the isms application islocated.

l Make sure that the corresponding backup packages exist in ~AAATools/backup before recovering thedatabases.

l See the introduction to the backup and recovery tool in A Introduction to the Backup and RecoveryTool.

Procedurel To recover all the database tables of the service database, do as follows:

1. Log in to the servers where the iscc application is located as user root.2. Transmit the AAABackup.tar.Z backup package to ~AAATools/backup of the server

in binary mode.3. Access ~AAATools/backup.4. Extract files from the AAABackup.tar.Z backup package .

# uncompress -vf AAABackup.tar.Z# tar -vxf AAABackup.tar

5. Recover the database tables.# ./restore.sh -l

NOTE

The -l parameter in the command indicates recovering all database tables.

l To recover all the database tables of the bill database, do as follows:1. Log in to the server where the isms application is located as user root.2. Transmit the AAABackup.tar.Z backup package to ~AAATools/backup of the server

in binary mode.3. Access ~AAATools/backup.4. Extract files from the backup package.

# uncompress -vf AAABackup.tar.Z# tar -vxf AAABackup.tar

5. Recover the database tables.# ./restore.sh -B

NOTE

The -B parameter in the command indicates the database tables of the bill database.

----End

2.4 Recovering Specified Database TablesThis section describes how to recover specified database tables.

Task DescriptionThis task helps you to recover the corrupted or deleted specified database tables that are backedup.

AAABackup and Recovery Guide 2 Guidelines for Recovering Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

14

Page 21: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

The recovery of the specified database tables needs the corresponding table files. You can usethe table files created when you back up the database tables to perform the recovery.

NOTE

To recover the specified database tables, note the following points:

l Recover the specified database tables of the service database on the server where the iscc application islocated.

l Recover the specified database tables of the bill database on the server where the isms application is located.

l See the introduction to the backup and recovery tool in A Introduction to the Backup and RecoveryTool.

Procedurel To recover the specified database tables of the service database, do as follows:

1. Log in to the servers where the iscc application is located as user root.

2. Transmit the backup package of the specified database tables to ~AAATools/backup.

3. Access ~AAATools/backup.

4. Recover the specified database tables.# ./restore.sh -s filename

l To recover the specified database tables of the bill database, do as follows:

1. Log in to the server where the isms application is located as user root.

2. Transmit the backup package of the specified database tables to ~AAATools/backup.

3. Access ~AAATools/backup.

4. Recover the specified database tables.# ./restore.sh -b filename

----End

2.5 Recovering Databases LogicallyThis section describes how to logically recover the service and bill databases.

Task Description

This task helps you to logically recover the database to any status since the database was created.That is, all the operations performed after the database was created can be recovered.

NOTE

To logically recover the databases, note the following points:

l Recover the service database on the server where the iscc application is located.

l Recover the bill database on the server where the isms application is located.

l See the introduction to the backup and recovery tool in A Introduction to the Backup and RecoveryTool.

Procedurel To recover the itellindb database, do as follows:

AAABackup and Recovery Guide 2 Guidelines for Recovering Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

15

Page 22: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

NOTE

Before the recovery, do as follows:

l Make sure that the onconfig.itellin.bak configuration file exists in /opt/informix/etc.

l Close the database because the Informix database adopts the offline recovery mode.

1. Log in to the server where the iscc application is located as user root.

NOTE

If user does not exist on the server where the iscc application is located, you can switch the devicegroup to a specified node throw the following commands:scswitch -z -g rg_iscc -h itellin1

2. Modify the onconfig.itellin.bak configuration file in /opt/informix/etc.

– Set the TAPEDEV parameter in the configuration file to ~AAATools/backup/AAABackup/itellin_online_net.tape.

– Set the TAPESIZE parameter in the configuration file to 2048000.3. Access /export/home/opt/informix/backup.4. Extract files from the AAABackup.tar.Z backup package .

# uncompress -vf AAABackup.tar.Z# tar -vxf AAABackup.tar

The AAABackup folder is generated, which contains the backup files used forrecovery.

5. Copy the backup files.Access the AAABackup folder, copy the itellin_online_net.tape.v1 file, and thenmodify the permission to use the file.# cp itellin_online_net.tape.v1 itellin_online_net.tape# chown informix:informix itellin_online_net.tape# chmod 660 itellin_online_net.tape

6. Switch to the informix user.# su - informix

7. Set the environment variable and edit .cshrc, Run the following command:vi .cshrcEdit the following contents in .cshrc.% setenv INFORMIXSERVER itellin_online_net % setenv ONCONFIG onconfig.itellin.bak

8. Run the following command to make the configuration file take effect.source .cshrc

9. Close the database.% onmode -ky

10. Recover the itellindb database.% ontape -r

The following information is displayed:Please mount tape 1 on /export/home/AAATools/backup/AAABackup/itellin_online_net.tape and press Return to continue ...

11. Press Enter.The following information is displayed:Continue restore?(y/n)

12. If you do not need to recover other files, type n and press Enter.The following information is displayed:

AAABackup and Recovery Guide 2 Guidelines for Recovering Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

16

Page 23: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

Do you want to back up the logs? (y/n)

13. If you do not need to back up logs, type n and press Enter.The following information is displayed:Please mount tape 2 on /export/home/AAATools/backup/AAABackup/itellin_online_net.tape and press Return to continue ...

NOTE

The preceding information is displayed when the size of database files is large and multipleitellin_online_net.tape.vn (n = 1, 2, 3...) backup files coexist.

14. Start the login tool again and log in as user root to access ~AAATools/backup.

15. Copy the itellin_online_net.tape.v2 file.cp itellin_online_net.tape.v2 itellin_online_net.tape

16. On the first server, press Enter.The following information is displayed:Restore a level 1 archive (y/n)

NOTE

If more backup files need to be recovered, repeat step 11 to step 16.

17. If you do not need to recover other files, type n and press Enter.The following information is displayed:Do you want to restore log tapes? (y/n)

18. If you do not need to recover logs, type n and press Enter.

19. Start the database.Run the following command:oninit

20. Check the database status.Run the following command:% onstat -

– If the following information is displayed, it indicates that the database is recoveredsuccessfully.IBM Informix Dynamic Server Version 9.40.UC2 -- On-Line -- Up 00:02:31 -- 251904 Kbytes

– If the following information is displayed, it indicates that the database is beingrecovered. Wait for a moment.IBM Informix Dynamic Server Version 9.40.UC2 -- Fast Recovery -- Up 00:01:11 -- 251904 Kbytes.

– If the following information is displayed, run the onmode -m command to switchthe database from the single-user state to the multi-user state.IBM Informix Dynamic Server Version 9.40.UC2 -- Quiescent -- Up 00:02:09 -- 251904 Kbytes

l To recover the sysdb database, do as follows:

1. Log in to the servers where the iscc application is located as user root.2. Access ~AAATools/backup.

3. Extract files from the backup package.# uncompress -vf AAABackup.tar.Z# tar -vxf AAABackup.tar

4. Recover the database../restore.sh -L

l Logically recovering the bill database of Informix

AAABackup and Recovery Guide 2 Guidelines for Recovering Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

17

Page 24: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

The recovery operations of the billdb database are the same as that of the itellindb database.In addition, you need to note the following points:

– Recover the database on the server where the isms application is located.

– Set the TAPEDEV parameter in the onconfig.itellin.bak configuration file to~AAATools/backup/AAABackup/itellin_online_net.tape.

NOTE

Set the value of the TAPEDEV parameter according to the actual situation.

– The file generated after the logical backup of the billdb database is calledbill_online_net.tape.vn (n = 1, 2, 3...).

– Set the database to be recovered to bill_online_net.

l Logically recovering the bill database of Oracle.

1. Log in to the servers where the isms application is located as user root.

2. Access ~AAATools/backup.

3. Extract files from the backup package.# uncompress -vf AAABackup.tar.Z# tar -vxf AAABackup.tar

4. Recover the database../restore.sh -L -B

----End

2.6 Recovering Configuration FilesThis section describes how to recover configuration files.

Task Description

This task helps you to recover the configuration files, service files, and license files of eachmodule of the AAA.

NOTE

l Recover the configuration files on the server where the iscc application is located and on the serverwhere the isms application is located.

l See the introduction to the backup and recovery tool in A Introduction to the Backup and RecoveryTool.

Procedure

Step 1 Log in to the server as user root.

Step 2 Transmit the AAABackup.tar.Z backup package to ~AAATools/backup of the servers in binarymode.

Step 3 Access ~AAATools/backup.

Step 4 Extract files from the AAABackup.tar.Z backup package .# uncompress -vf AAABackup.tar.Z# tar -vxf AAABackup.tar

AAABackup and Recovery Guide 2 Guidelines for Recovering Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

18

Page 25: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

Step 5 Recover the configuration files.# ./restore.sh -c

----End

2.7 Recovering Bill FilesThis section describes how to recover bill files.

Task Description

NOTE

l Recover the bill files on the server where the isms application is located.

l See the introduction to the backup and recovery tool in A Introduction to the Backup and RecoveryTool.

Procedure

Step 1 Log in to the server as user root.

Step 2 Transmit the AAABackup.tar.Z backup package to ~AAATools/backup of the servers in binarymode.

Step 3 Access ~AAATools/backup.

Step 4 Extract files from the AAABackup.tar.Z backup package .# uncompress -vf AAABackup.tar.Z# tar -vxf AAABackup.tar

Step 5 Run the following command to recover the bill files.# ./restore.sh -bf

NOTE

The -bf parameter in the command indicates recover the bill files.

----End

AAABackup and Recovery Guide 2 Guidelines for Recovering Data

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

19

Page 26: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

A Introduction to the Backup and RecoveryTool

This chapter describes how to obtain the backup and recovery tool of the AAA, and the functionsand modules of the tool.

Obtaining Process

The backup and recovery tool is integrated in the Breeze and stored in ~AAATools/backup.

NOTE

In the ~AAATools/backup path, the symbol ~ represents the installation path of the system. The installationpath is /export/home/ by default.

To obtain the backup and recovery tool in the ~AAATools/backup path.

Path

The path for storing the backup data is same to installation path.

NOTE

The path for storing the backup data is ~AAATools/backup by default.

Function

The functions of the backup and recovery tool are as follows:

l Backing up the database records, logic information, configuration files, and bill files of theAAA.

l Recovering the backup data when the database of the AAA is faulty and the data is missing.

Module Function

Table A-1 describes the detailed functions of each module of the backup and recovery tool.

AAABackup and Recovery Guide A Introduction to the Backup and Recovery Tool

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

20

Page 27: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

Table A-1 Functions of each module of the backup and recovery tool

Module Name Function Description

backup.sh Indicates the main program of the backup and recovery tool.Run the program as user root to back up the database and files.

backup_function Indicates the library file of functions that is invoked by the backupand recovery tool.

monitor Indicates the monitor process of the backup and recovery tool.

restore.sh Indicates the main program of the backup and recovery tool.

restore_function Indicates the library file of feature functions that is invoked by thebackup and recovery tool.

watch.sh Indicates the process for monitoring the backup.If the backup process times out, it stops automatically.

config.ini Indicates the configuration file of the backup and recovery tool. Thefile is used to set the storing path and the information related to thedatabase.NOTE

You can retain the default values of the parameters in the configuration file.

backup.log Indicates the log of restore.sh.

restore.log Indicates the log of backup.sh.

AAABackup and Recovery Guide A Introduction to the Backup and Recovery Tool

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

21

Page 28: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

B Introduction to the Tape Drive

This chapter describes the rules and methods of using a tape drive to back up data.

B.1 Rules for Using the Tape DriveThis section describes the rules for using the tape drive.

B.2 Guidelines for Using the Tape DriveThis section describes how to connect the tape drive and the server, and how to store the backupdata on tape.

AAABackup and Recovery Guide B Introduction to the Tape Drive

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

22

Page 29: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

B.1 Rules for Using the Tape DriveThis section describes the rules for using the tape drive.

To back up data by using a tape drive, follow the rules in the following:

l Do not use the same tape repeatedly. This will prevent the tape drive from being corrupted.

l When you complete the backup, take the tape out and attach a label on the tape about thebackup. For example, you can record the date on the label. Store the tape properly.

B.2 Guidelines for Using the Tape DriveThis section describes how to connect the tape drive and the server, and how to store the backupdata on tape.

Instructions

You can free up disk space by storing backup files on tapes. In this case, the disk space can beused repeatedly.

Connect the tape drive and the server before you back up or recover data by using a tape drive.

The following describes how to prepare for the backup and recovery of data by using a tapedrive.

Procedurel To prepare for the backup that uses the tape drive, do as follows.

NOTE

Perform the following operations on the active node and standby node.

1. Connect the tape drive to the server and turn on the switch at the back of the tape drive.

2. Insert a tape into the tape drive.Several seconds later, the Tape indicator light blinks indicating that the tape is found.After the indicator light blinks for several times, it remains on. Then the tape drive isready for backup.

3. Log in to the server as user root.4. View the contents on the tape.

tar tvf /dev/rmt/*

5. Store the backup file on tape.tar -cvf Path of the tape drive(/dev/rmt/0m) ~AAATools/backup/backup files

NOTE

If the tape drive does not respond, perform the following steps to reload the system hardware:

1. Shut down the server to the OK state. Restart the server when the service running is not affected.shutdown -i0 -g0 -y

2. Restart the server in the OK state.boot -r

l To prepare for the recovery that uses the tape drive, do as follows.

AAABackup and Recovery Guide B Introduction to the Tape Drive

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

23

Page 30: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

NOTE

Perform the following operations on the active node and standby node.

1. Connect the tape drive to the server. For details, see the preceding preparations forbackup.

2. Log in to the server as user root.3. Access the path where temporary backup files are stored.

You can specify the path. The default path is ~AAATools/backup.4. Insert a tape to the tape drive. Copy the backup files to the path of the temporary

backup files.tar -xvf /dev/rmt/0n

----End

AAABackup and Recovery Guide B Introduction to the Tape Drive

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

24

Page 31: AAA Backup and Recovery Guide (V200R002C11LG0250_10) (SUN)

C Acronyms and Abbreviations

A

AAA Authentication, Authorization and Accounting

ATAE Advanced Telecommunication Application Environment

S

SCSI Small Computer Systems Interface

SSH Secure Shell

U

USM Universal Server Manager

AAABackup and Recovery Guide C Acronyms and Abbreviations

Issue 10 (2013-03-15) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

25