01-09 database backup and restoration

Upload: edwin1234567890

Post on 03-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 01-09 Database Backup and Restoration

    1/18

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide Contents

    Issue 02 (2007-10-15) Huawei Technologies Proprietary i

    Contents

    9 Database Backup and Restoration ..........................................................................................9-1

    9.1 Database Backup Tool...................................................................................................................................9-2

    9.1.1 Backup Policy ..................................................................... ................................................................. 9-2

    9.1.2 Backup Medium...................................................................................................................................9-2

    9.1.3 Backup Path .................................................................. ................................................................ .......9-2

    9.1.4 Starting the Database Backup Tool ............................................................. .........................................9-3

    9.2 Manual Backup .......................................................... .................................................................. .................9-5

    9.2.1 Manual Backup Flow Chart ..................................................................... ............................................9-5

    9.2.2 Configuring a Database Set..................................................................................................................9-7

    9.2.3 Configuring a Backup Device..............................................................................................................9-8

    9.2.4 Backing Up the DMS Database Manually ......................................................................... ..................9-9

    9.3 Automatic Backup.........................................................................................................................................9-9

    9.3.1 Automatic Backup Flow Chart.............................................................................................................9-9

    9.3.2 Configuring an Automatic Backup Policy ..................................................................... .................... 9-11

    9.3.3 Configuring an Automatic Backup Task ................................................................... .........................9-12

    9.4 Restoring the Database................................................................................................................................9-12

    9.4.1 Restoring Database Flow Chart .............................................................. ...........................................9-12

    9.4.2 Stopping DMS Service Processes ................................................................................. .....................9-13

    9.4.3 Restoring Backup Date .................................................................. .................................................... 9-14

    9.4.4 Restarting DMS Service Processes .......................................................................... ..........................9-14

    9.5 Query the Backup and Restoration Logs.....................................................................................................9-15

    9.6 Viewing Database Details ................................................................ ........................................................... 9-15

  • 7/28/2019 01-09 Database Backup and Restoration

    2/18

    Figures

    iManager N2000 DMS Datacomm Network

    Management System

    Administrator Guide

    ii Huawei Technologies Proprietary Issue 02 (2007-10-15)

    Figures

    Figure 9-1 Database backup tool interface ................................................................. ........................................9-4

    Figure 9-2 Adding servers .................................................... .......................................................... ....................9-4

    Figure 9-3 User login interface...........................................................................................................................9-5

    Figure 9-4 Manual backup flow chart ............................................................. ................................................... 9-6Figure 9-5 Configuring the database set.............................................................................................................9-7

    Figure 9-6 Modifying the backup device ............................................................................ ...............................9-8

    Figure 9-7 Automatic backup flow...................................................................................................................9-10

    Figure 9-8 Adding the automatic backup policy...............................................................................................9-11

    Figure 9-9 Restoring database flow chart.........................................................................................................9-13

    Figure 9-10 Viewing database details...............................................................................................................9-16

  • 7/28/2019 01-09 Database Backup and Restoration

    3/18

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide 9 Database Backup and Restoration

    Issue 02 (2007-10-15) Huawei Technologies Proprietary 9-1

    9 Database Backup and RestorationAbout This Chapter

    The following table lists the contents of this chapter.

    Section Describes

    9.1 Database Backup Tool This section describes the database backup tool.

    9.2 Manual Backup This section describes how to back up the databasemanually.

    9.3 Automatic Backup This section describes how to configure the automatic

    backup database.9.4 Restoring the Database This section describes how to restore data in the database.

    9.5 Query the Backup andRestoration Logs

    This section describes how to check the backup log andthe restored log.

    9.6 Viewing Database Details This section describes how to view the databaseinformation.

  • 7/28/2019 01-09 Database Backup and Restoration

    4/18

    9 Database Backup and Restoration

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide

    9-2 Huawei Technologies Proprietary Issue 02 (2007-10-15)

    9.1 Database Backup Tool

    With the database backup tool, you can back up and restore the DMS database to protect thedata.

    With this tool, you can also maintain the NMS database remotely to make the backup andrestoration operation conveniently.

    The basic functions of the database backup tool are as follows:

    z Viewing Information

    You can view the general information of the DMS database and logs operated by thebackup tool.

    z Configuring Parameters

    You can set the parameters for the backup, including the Backup Device, Database Setand Auto Backup Policy.

    z

    Performing TasksYou can back up and recover the database, including Manual Backup, Auto BackupTaskand Restore Database.

    The database backup tool is provided as a stand-alone component. This function is supported only whenthis component is selected during the installation of the DMS.

    9.1.1 Backup Policy

    The database backup tool supports two backup policies as follows:

    z Manual backup

    z Scheduled (automatic) backup

    Every day: The system backs up data every day.

    Every week: The system backs up data on a specific day every week.

    Every month: The system backs up data on a specific day every month.

    9.1.2 Backup Medium

    The database backup tool backs up data to:

    z Disk

    z Tape

    9.1.3 Backup Path

    For the disk backup, the default backup directory of the DMS is $N2000ROOT/backup.

    In the same database set, up to n (4 by default) backup data files can be stored.

    In the same database set, the maximum times of data backup are four. If exceeds four, the systemprompts you whether to delete the earliest backup and add a new backup.

  • 7/28/2019 01-09 Database Backup and Restoration

    5/18

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide 9 Database Backup and Restoration

    Issue 02 (2007-10-15) Huawei Technologies Proprietary 9-3

    9.1.4 Starting the Database Backup Tool

    Description

    Before backing up the database, you need to start the database backup tool.

    Precaution

    Before starting the database backup tool, note the following:

    z The DMS server runs normally.

    z The backup process of the database runs normally.

    z The client of the database backup tool communicates well with the DMS server.

    Procedure

    The database backup tool allows only one user to log in to the server database.

    Step 1 The mode of starting the Windows OS and the Solaris OS are as follows respectively.z In Windows, choose Program > iManager N2000 > N2000 Database Backup Tool in

    the Start menu. Or double-click the icon to start the database backup tool, asshown in Figure 9-1.

    z In the Solaris OS, input the following in the terminal window.

    # cd /opt/n2000/client

    # ./bktool.sh

    Start the database backup tool.

  • 7/28/2019 01-09 Database Backup and Restoration

    6/18

    9 Database Backup and Restoration

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide

    9-4 Huawei Technologies Proprietary Issue 02 (2007-10-15)

    Figure 9-1Database backup tool interface

    Step 2 Choose System > Add Server and configure the DMS server name and IP address as shownin Figure 9-2.

    ClickAdd.

    Figure 9-2Adding servers

    Step 3 On the navigation tree of the server, choose the server to be logged in to.Step 4 In the Access Password textbox, enter the login password of the DMS database user

    N2000user, as shown in Figure 9-3.

  • 7/28/2019 01-09 Database Backup and Restoration

    7/18

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide 9 Database Backup and Restoration

    Issue 02 (2007-10-15) Huawei Technologies Proprietary 9-5

    Figure 9-3User login interface

    For details about the database userN2000user, refer to Chapter 2 "User Management."

    Step 5 ClickOK.----End

    9.2 Manual Backup

    9.2.1 Manual Backup Flow Chart

    Figure 9-4 shows the manual backup flow chart.

  • 7/28/2019 01-09 Database Backup and Restoration

    8/18

    9 Database Backup and Restoration

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide

    9-6 Huawei Technologies Proprietary Issue 02 (2007-10-15)

    Figure 9-4Manual backup flow chart

    End

    Start the database backup tool

    Configure the database server

    Configure the database set

    Configure a backup device

    Back up the DMS database manually

    Start

    Modify the backup path?

    Yes

    No

    For details of starting the database backup tool and configuring the database server, see 9.1.5" Starting the Database Backup Tool xe "Starting the Database Backup Tool" ."

  • 7/28/2019 01-09 Database Backup and Restoration

    9/18

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide 9 Database Backup and Restoration

    Issue 02 (2007-10-15) Huawei Technologies Proprietary 9-7

    9.2.2 Configuring a Database Set

    Description

    You can realize the batch database backup and restoration by configuring the database set.According to different requirements for backup and restoration, you can combine one or moredatabases to different sets to enable these sets to be shared for backup or restoration tasks.

    One database can be distributed to several sets.

    Precaution

    The first character of the name of the database set cannot be the underline "_". The names ofthe database sets must be different from each other.

    Procedure

    Step 1 Start the database backup tool and log in to the server node to be configured.Step 2 Choose Configuration > Database Set. Or in the navigation tree, choose the Configuration

    > Database Set node.

    Step 3 ClickAdd and enter the configuration page, as shown in Figure 9-5.Figure 9-5Configuring the database set

    Step 4 In the Database Set Name textbox, enter the name of the database set to be created.Step 5 In the Database For Selection textbox, select the database to be contained and then click

    .

    Clicking , you can select all databases.

  • 7/28/2019 01-09 Database Backup and Restoration

    10/18

    9 Database Backup and Restoration

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide

    9-8 Huawei Technologies Proprietary Issue 02 (2007-10-15)

    Step 6 ClickFinish, the Prompt dialog box appears. ClickOKto complete the creation of thedatabase set.

    ----End

    9.2.3 Configuring a Backup Device

    Description

    Modify the backup path of the backup device.

    When you use the disk for backup, the DMS default path is $N2000ROOT/backup.

    Precaution

    When you use the tape for backup, you need to initialize the tape.

    Procedure

    Step 1 Start the database backup tool and log in to the server node to be configured.Step 2 Choose Configuration > Backup Device. Or in the navigation tree, choose the

    Configuration > Backup Device node. The configuration page is displayed.

    Step 3 Select the backup device (here takes diskas an example) and clickModify. The Modifybackup device interface is displayed, as shown in Figure 9-6.

    Figure 9-6Modifying the backup device

    The backup device of the tape type can be used only after the device is initialized.

    Step 4 In theModify backup device box, you can modify the path to back up the device. IfEnableRemote Copy Function is selected, you set the path for the remote copy function.

  • 7/28/2019 01-09 Database Backup and Restoration

    11/18

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide 9 Database Backup and Restoration

    Issue 02 (2007-10-15) Huawei Technologies Proprietary 9-9

    Step 5 ClickModify. In the Prompt dialog box that appears, clickOKto complete the modificationof the backup path.

    The method to modify the tape path is the same with that of the backup path.

    ----End

    9.2.4 Backing Up the DMS Database Manually

    Description

    Back up data in the DMS database manually. Perform the backup operation manually whenthe DMS server has low load.

    Prerequisites

    z The database set is configured.

    z The backup device is configured.

    Precaution

    Step 1 Start the database backup tool and log in to the server node to be configured.Step 2 Choose Operation > Manual Backup. Or in the navigation tree, choose the Operation >

    Manual Backup node.The Select Database Set To Backup box is displayed.

    Step 3 Choose the database set to be backed up. ClickNext.Step 4 Choose the device to be backed up.

    z If the backup device is disk, clickNext to perform Step 5.

    z If the backup device is tape, perform Step 6.

    Step 5 Choose backup type.z backup: In this mode, the data is backed up from database to data files.

    z bcpout: In this mode, the database user tables are copied to a data files. This mode cannot be used asa general database backup.

    Step 6 ClickStart to back up data to the specified path.----End

    9.3 Automatic Backup

    9.3.1 Automatic Backup Flow Chart

    Scheduled backup realizes periodic backup of data. The system automatically backs up dataaccording to the backup policy without manual intervention.

    Figure 9-7 shows the automatic backup flow chart.

  • 7/28/2019 01-09 Database Backup and Restoration

    12/18

    9 Database Backup and Restoration

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide

    9-10 Huawei Technologies Proprietary Issue 02 (2007-10-15)

    Figure 9-7Automatic backup flow

    End

    Start the database backup tool

    Configure the database server

    Configure the database set

    Configure an automatic backup policy

    Configure a backup device

    Configure an automatic backup task

    Back up the DMS database automatically

    Start

    Modify the backup path?

    Yes

    No

    For details of starting the database backup tool and configuring the database server, seesection 9.1.4 " Starting the Database Backup Tool xe "Starting the Database Back up Tool" ."

    For details of configuring the database set, see section 9.2.2 "Configuring a Database Set."

    For details of configuring the backup device, see section 9.2.3 "Configuring a Backup Device xe "Configuring a Backup Device" ."

  • 7/28/2019 01-09 Database Backup and Restoration

    13/18

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide 9 Database Backup and Restoration

    Issue 02 (2007-10-15) Huawei Technologies Proprietary 9-11

    9.3.2 Configuring an Automatic Backup Policy

    Description

    Configure the period and start time of the scheduled backup policy.

    To keep the normal maintenance operation, it is recommended to set the start time forautomatic backup between 00:00 and 06:00.

    Precaution

    The first character of the name of the scheduled backup policy cannot be underline "_". Thenames of the database sets must be different from each other.

    Procedure

    Step 1 Start the database backup tool and log in to the server node to be configured.Step 2 Choose Configuration > Auto Backup Policy. Or in the navigation tree, choose the

    Configuration > Auto Backup Policy node. ClickAdd. The configuration page is displayed,as shown in Figure 9-8.

    Figure 9-8Adding the automatic backup policy

    Step 3 Enter the name of the backup policy in the Time Policy Name textbox.Step 4 Choose the time period and start time of the backup policy.Step 5 ClickFinish. In the Prompt dialog box that appears, clickOKto complete the creation of the

    backup policy.

    ----End

  • 7/28/2019 01-09 Database Backup and Restoration

    14/18

    9 Database Backup and Restoration

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide

    9-12 Huawei Technologies Proprietary Issue 02 (2007-10-15)

    9.3.3 Configuring an Automatic Backup Task

    Description

    According the created database set and scheduled backup policy, create the scheduled backuptask to enable the system to automatically back up the selected database in the specified time.

    Precaution

    Only after configuring the database set and scheduled backup policy, you are allowed toconfigure the scheduled backup task.

    Procedure

    Step 1 Start the database backup tool and log in to the server node to be configured.Step 2 Choose Operation > Auto Backup Task. Or in the navigation tree, choose the Operation >Auto Backup Tasknode. ClickAdd. The configuration page is displayed.Step 3 Select the database set to be backed up. ClickNext.Step 4 Select the scheduled backup policy. ClickNext.Step 5 ClickFinish. In the Prompt dialog box that appears, clickOKto complete scheduled backup

    task.

    After completing the configuration of the backup task, the system backs up the data accordingto the scheduled backup policy.

    ----End

    9.4 Restoring the Database

    9.4.1 Restoring Database Flow Chart

    Figure 9-9 shows the operation flow chart of restoring the database by the data backup file.

  • 7/28/2019 01-09 Database Backup and Restoration

    15/18

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide 9 Database Backup and Restoration

    Issue 02 (2007-10-15) Huawei Technologies Proprietary 9-13

    Figure 9-9Restoring database flow chartStart

    Prepare the database

    backup file

    End

    Stop DMS

    service process

    Restore backup

    data

    Restart DMSservice processes

    9.4.2 Stopping DMS Service Processes

    Description

    Before restoring the database, you need to stop the DMS service process that is running.

    Stop the DMS service process by the Sysmonitor.

    Precautionz Stopping the process affects the DMS function; therefore, random operations are

    prohibited.

    z Do not stop the database backup process. Otherwise, you cannot back up and restore thedatabase.

    Procedure

    Step 1 Log in to the DMS client.Step 2 Choose System > Stop Server.Step 3 ClickOKto stop the DMS service process.Step 4 After stopping the DMS service process, select the Process tab and records ofDatabase

    Backup Process.

    Step 5 Right-click the page. Select Start Process to start the database backup process.----End

  • 7/28/2019 01-09 Database Backup and Restoration

    16/18

    9 Database Backup and Restoration

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide

    9-14 Huawei Technologies Proprietary Issue 02 (2007-10-15)

    9.4.3 Restoring Backup Date

    Description

    Restore the backup data to the DMS database to reduce the loss caused by the faults or errorsof the database.

    Precaution

    Before the backup data is restored, the following conditions need to be satisfied:

    z The backup data file exists in the specified path of the backup device.

    z Before restoring the database, ensure that no connection to the database exists, which isset up by the DMS users and other users. Otherwise, the database cannot be restored.

    Procedure

    Step 1 Start the database backup tool and log in to the server node to be configured.Step 2 Choose Operation > Restore Database. Or in the navigation tree, choose the Operation >

    Restore Database node .The configuration window is displayed.

    Step 3 Select the backup device, ClickNext.Step 4 Select the restoration type. ClickNext.Step 5 Select the database set to restore. ClickNext.Step 6 Select the database to restore. ClickNext.Step 7 Select the backup files. ClickRestore to restore the data from the specified path.

    ----End

    9.4.4 Restarting DMS Service Processes

    Description

    After restoring the database, restart the service process by the SysMonitor to enable the DMSserver to run normally.

    Procedure

    Step 1 Log in to the DMS client.Step 2 Choose System> Start Server and start the DMS server.

    ----End

  • 7/28/2019 01-09 Database Backup and Restoration

    17/18

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide 9 Database Backup and Restoration

    Issue 02 (2007-10-15) Huawei Technologies Proprietary 9-15

    9.5 Query the Backup and Restoration Logs

    Description

    The backup and restoration operation of the DMS database are realized by the databasebackup tool. You can view the operation records of backup and restoration in the databasebackup tool.

    Procedure

    Step 1 Start the database backup tool and log in to the server node to be configured.Step 2 Choose View > Log . Or in the navigation tree, choose the View > Log node,and configure

    the parameters in the Check log box.

    z Log type: Choose the type to be viewed, including All, Backup and Restore

    z Time range: View the time field to be viewed, including Recent Month, Recent Three

    Months, Recent Six Months and Recent Year.

    Step 3 ClickNext. The information of the logs that satisfy the previous conditions is displayed in theOperation Log box.

    ----End

    9.6 Viewing Database Details

    Description

    View the basic information of the DMS database, including the size, used Size and createdtime.

    Procedure

    Step 1 Start the database backup tool and log in to the server node to be configured.Step 2 Choose View >Database. Or in the navigation tree, choose the View >Database node,The

    browse page is displayed as shown in Figure 9-10.

  • 7/28/2019 01-09 Database Backup and Restoration

    18/18

    9 Database Backup and Restoration

    iManager N2000 DMS Datacomm Network Management System

    Administrator Guide

    9-16 Huawei Technologies Proprietary Issue 02 (2007-10-15)

    Figure 9-10Viewing database details

    Step 3 In the All Database box, select the database to be viewed. In the Description box, view thedetails of the database.

    ----End