N1 Provisioning Server 3.1, Blades Edition, System Administration Guide

Chapter 5 Backing Up and Restoring Components

This chapter describes backup and restoration of Infrastructure Fabric (I-Fabric) components. Sections in this chapter include:

Backup is an essential administration task and one that you will do frequently. This chapter provides general information for backing up and restoring I-Fabric components.

This chapter does not describe particular procedures for backing up because backup policies and procedures are usually specific to an organization. You should have a qualified database administrator (DBA) and a skilled systems administration staff to advise on or implement a local backup procedure. Ensure that backup and storage media rotation schedules are consistent with your best practices and take into account the rate of change within your particular I-Fabric.

General Backup

Back up the /etc/opt/terraspring/tspr.properties file immediately following installation for possible later use in system restoration. Because this file is static, you do not need to back it up again.

ProcedureGeneral Backup

Steps
  1. Copy the Wiring Markup Language (WML) file to a file to be backed up.

    wmld > dc.wml

    For more details on the wmld command see the wmld man page.

  2. Back up the list of images at regular intervals.

    image -lv > images.out

Backing Up the Control Plane Server

The control plane might consist of one or two servers depending on whether your configuration includes a stand-alone image server or has the image server residing on the control plane server.

The control plane server contains the N1 Provisioning Server software , which fulfills the following roles:

The strategy for backing up a control plane server is to designate a server that is not part of the I-Fabric as a backup server and connect it to the control plane network. A variety of commercial backup software is available for performing backup. The only requirement is that it must be able to back up to Oracle or Postgres databases. When you install your N1 Provisioning Server, an IP address and port are designated for the backup server. See the N1 Provisioning Server 3.1, Blades Edition, Installation Guide for details.

The following section details the requirements for backing up and restoring a control plane server.

ProcedureTo Configure a Backup Server

To configure a backup server perform the following steps:

Steps
  1. Select a port on the control plane switch to connect a backup server.

  2. Assign that port into virtual local area network (VLAN) 9.

  3. Connect an appropriate tape backup device directly to the backup server.

  4. The IP address x.y.z.212 has been reserved for the backup server. N1 Provisioning Server software provides the x, y, and z values. The x.y.z value is the subnet your N1 Provisioning Server uses. Configure the backup server to use this address.

  5. Install and configure backup server software on the backup server according to the supplier's instructions and your local requirements.


    Note –

    The backup server must not route or bridge any Ethernet traffic between VLAN 9 and any other network to prevent unauthorized access to the N1 Provisioning Server network.


Backing Up a CPDB

Every time a farm changes the CPDB changes. Therefore, you should perform frequent, regular backups of the CPDB.


Caution – Caution –

Restoring the CPDB restores the associated farms to the state of the last backup. Farm changes made subsequent to the most recent backup are lost.


Run the backupdb command from the CPDB to back up the CPDB. For details on how to use this command, see the backupdb man page.


Note –

Backing up the CPDB does not back up the Control Center. See Backing Up the Control Center Database and the CPDB for details on backing up both, the CPDB and the Control Center, at the same time.


Backing Up the Control Center Database and the CPDB

The Control Center consists of software executable files and a database. Because the software files do not change after they have been installed, you can reinstall the software executables from the DVD to restore them.

This section describes backup of the Control Center and CP server database components running on either an Oracle or a Postgres database depending on which one you are using. The database stores all the data and state information for the Control Center. This is a general description of the Control Center and CPDB component backup process. For details on how to back up an Oracle or Postgres database, refer to the respective database manufacturer's documentation.


Note –

We recommend backing up the Control Center, CPDB, Control Center database, data files, control files, redo logs, init.ora files, and password files at regular intervals.



Note –

Database backup and restoration is a complicated task. Therefore, we strongly recommend that an experienced Oracle DBA perform this task.


Backing Up a Control Center and CP Server

This section describes the backup of the Control Center and CP server components running on either an Oracle or a Postgres database depending on which one you are using. The database stores all the data and state information for the Control Center. This is a general description of the Control Center and CPDB backup process. For step-by-step procedures for the full Oracle or Postgres database backup refer to the respective database manufacturer's documentation.

Back up the Control Center, CPDB, Control Center database, data files, control files, redo logs, init.ora files, {postgres_data}, and password files at regular intervals.


Note –

Full database backup and restoration is a complicated task. Therefore, an experienced DBA should perform this task.


ProcedureTo Back up the Control Center and Control Plane Server Components

Steps
  1. To back up the control plane server database run the following commands.

    For backing up the control plane server component running on an Oracle database:

    /opt/terraspring/sbin/backupdb -o $ {Oracle_Home} backup file name

    For backing up the control plane server component running on a Postgres database:

    /opt/terraspring/sbin/backupdb -o $ {Postgres_Home} backup file name

  2. To back up the Control Center database run the following commands.

    For backing up the Control Center component running on an Oracle or a Postgres database:

    /opt/terraspring/gwdb/bin/backupDB.sh

Control Center and CPDB File Locations

For the Oracle database, set the ORACLE_HOME variable to a directory, for example, /opt/oracle/OraHome1. By default, the Control Center and CPDB data files and control files for the Oracle database reside in the directory /oracle_data1/tsprdb/DATA.

The Postgres database is bundled with the N1 Provisioning Server software package and the default location of all the data and control files is POSTGRES_HOME/data.


Note –

Because the data file and control file locations are configurable, your precise file path may vary.


Data and Control File Location

The data and control file location is configurable.

ProcedureTo Back Up Data and Control Files

Steps
  1. Back up the following Control Center file:

    /opt/terraspring/sunone/domain_gw/server_gw/config/cc.properties

  2. Back up all files in the following directories:

    /var/opt/terraspring/gw

    /var/opt/terraspring/gwdb

Backing Up an Image Server

The image repository can run either on the control plane server or on separate server. If you run the image repository on a separate server, use a file transfer protocol (FTP) server. Images are stored as files. Use standard file system backup procedures as appropriate for your system environment to back up the image server.

Restoring a CPDB

Before restoring a CPDB, ensure that no changes to farm states have been made other than in the database. Otherwise, the database is no longer in sync with the rest of the system.


Caution – Caution –

If you have created several backups, ensure that you restore from the most current backup file, otherwise the servers will be out of synchronization with the database. Consequently you will lose your most recent changes.


Run the restoredb command from the CPDB to back up the CPDB. For details on how to use this command, see the restoredb man page.


Note –

Restoring the CPDB does not restore the Control Center. See Restoring a Control Center for details on restoring both, the CPDB and the Control Center, at the same time.


Restoring the Control Center and the CP Server

Restoring to the point of failure on an Oracle or Postgres database requires the following information:

For an Oracle database, the database looks for archived redo logs in the location specified by the LOG_ARCHIVE_DEST parameter of the initdb-name.ora file. Alternatively, you can specify a location for the archived redo logs manually by using the from clause in the alter database recover... statement.

ProcedureTo Restore the Control Center and the CP Server Component Running on Either an Oracle or Postgres Database

Steps
  1. Run the command:

    /opt/terraspring/sbin/restoredb restored file name


    Note –

    The parameter restored file name refers to the backup file created during backup of the database.


  2. Run the configure.sh script and provide the required parameters when prompted.

    /opt/terraspring/gwdb/bin/configure.sh

    For a Postgres database:


    DB_TYPE                      Postgres (case-sensitive)
           DB Admin User:                postgres
           DB Admin Password:            postgres
           DB User:                      tcc
           DB Password:                  tcc
           DB HOst Name:                 localhost
           DB Instance Name:             tsprdb
           DB Instance Listening Port:   5432
           DB Backup Directory:          backup direcotry name
           DB Backup Filename:           backup file name
    

    For an Oracle database:


    DB_TYPE                      Postgres (case-sensitive)
           DB Admin User:                system
           DB Admin Password:            manages
           DB User:                      tcc
           DB Password:                  tcc
           DB HOst Name:                 localhost
           DB Instance Name:             tsprdb
           DB Instance Listening Port:   1521
           DB Backup Directory:          backup direcotry name
           DB Backup Filename:           backup file name
    
  3. To create the database type:

    /opt/terraspring/gwdb/bin/createDB.sh -y

  4. To restore the database type:

    /opt/terraspring/gwdb/bin/restoreDB

Restoring a Control Center

Restore the Control Center by reinstalling the software from the DVD and then reinstalling the applicable backup files.

Restoring an Image Server

Use standard restoration procedures as appropriate for your system to restore an image server.