Sun N1 System Manager 1.3 Discovery and Administration Guide

Chapter 3 Backing Up and Restoring

This chapter provides information about backup and restore procedures for the management server's database and configuration files.

This chapter contains the following sections:

Backing Up Database and Configuration Files

This section describes how to back up the N1 System Manager database and configuration files. Successful completion of the procedure in this section enables you to swap management server and management server-related hardware without losing the N1 System Manager database and configuration files.


Note –

Using the back up script provided in the N1 System Manager software as described in this section does not back up OS profiles.


ProcedureTo Back Up Database and Configuration Files

This procedure describes how to back up the database and configuration files from a running management server. The N1 System Manager service is restarted several times during this process. Therefore, perform these steps only when the N1 System Manager is not currently running jobs.

Do not change the configuration or OS usage of the managed servers during the period between executing the backup and restore procedures.

Before You Begin

Identify a server with similar hardware and network configurations as that of the original management server.

Steps
  1. Log in to the management server as superuser (root).

    See To Access the N1 System Manager Command Line for details.

  2. Run the n1smbackup.sh script.

    For example:


    # /opt/sun/n1gc/bin/n1smbackup.sh
    This program will back up Sun N1SM on this Linux/SunOS machine.
    
    The N1SM services will be restarted and N1SM will be interrupted during 
    the process.
    
    All files related to N1SM, including network interface 
    configuration, will be backed up. Therefore, it is recommended 
    that these files are restored to an identical hardware setup. 
    
    Verify that N1SM does not have outstanding jobs before proceeding.
    
    The backup process will take about 8 minutes.
    
    Would you like to continue? [y/N] y
    
    Backing up configuration files (done)
    Backing up SCS database (done)
    Backing up SPS database (done)
    N1SM restarted.
    N1SM backup completed. Backup saved to file 
    /var/tmp/n1smbackup/n1smbackup.tgz.

    The backup file and the /var/tmp/n1smbackup directory are created.

  3. Save the /var/tmp/n1smbackup/n1smbackup.tgz file to a safe location, for example, to CD media, FTP, or NFS.

Next Steps

To Restore Database and Configuration Files

Restoring N1 System Manager Database and Configuration Files

This section describes how to restore the N1 System Manager database and configuration files. Successful completion of the procedure in this section enables you to replicate the database and configuration files from one N1 System Manager installation to another installation.

ProcedureTo Restore Database and Configuration Files

This procedure describes how to restore the N1 System Manager database and configuration files to a newly installed management server.

The N1 System Manager service is restarted several times during this process. Therefore, perform these steps only when the N1 System Manager is not currently running jobs.

These steps require that the N1 System Manager is not yet installed on the server. Also, preferably, a new installation of either Linux or the Solaris OS should be installed on the server.

The n1smbackup.sh script backs up only the N1SM database and configuration files. The actual OS files are not backed up. After running n1smrestore.sh, OS distributions and OS profiles that exist in the database will need to be deleted and recreated.

Before You Begin
Steps
  1. Log in to the management server as superuser (root).

    See To Access the N1 System Manager Command Line for details.

  2. Run the n1smconfig utility.


    # /usr/bin/n1smconfig
    

    The current system configuration appears, and lists the network interfaces. You are then asked to enter the interface for the provisioning network.

  3. Specify the port for the provisioning network interface.

    The available interfaces are listed in the prompt. Type the interface name that is to be used for the provisioning interface, for example eth0, hme0, bge0 and so on depending on the machine architecture and installed OS.

  4. Answer the remaining questions in the n1smconfig utility.

    Note that the remaining answers given in n1smconfig will be overwritten by the following steps in this procedure. It is important to provide the answers and to apply the new settings in order to complete the restore process.

  5. Create the /var/tmp/n1smbackup directory on the management server.


    # mkdir /var/tmp/n1smbackup
    
  6. Copy the n1smbackup.tgz backup file to the /var/tmp/n1smbackup directory.

  7. Restore the N1 System Manager database and configuration files:


    # /opt/sun/n1gc/bin/n1smrestore.sh -f /var/tmp/n1smbackup/n1smbackup.tgz
    
    This program will restore Sun N1SM from backup files.
    
    The N1SM services will be restarted and N1SM will be interrupted during 
    the process.
    
    All files related to N1SM, including network interface 
    configuration, will be restored. Therefore, it is recommended 
    that these files are restored to an identical hardware setup. 
    
    The restore process will take about 8 minutes.
    
    Would you like to continue? [y/N] y
    
    Restoring configuration files (done)
    Restoring SCS database (done)
    Restoring SCS database (done)
    N1SM restarted.
    N1SM restore completed.
    Run n1smconfig and verify that N1SM settings are correct.
  8. Verify that the N1 System Manager configuration settings are still valid or modify them as appropriate.


    # /usr/bin/n1smconfig
    
  9. Verify that the N1 System Manager is working as expected, using the browser interface or n1sh command line.

    See To Access the N1 System Manager Command Line for details.

  10. (Optional) Remove any OS distributions or OS profiles that exist on the management server before creating new OS distributions and OS profiles.


    N1-ok> show os all
    ID     Name                  Type          Version
    2      s10                   solaris       solaris10x86
    
    N1-ok> show osprofile
    ID     Name                       Distribution
    2      s10                        s10
    
    N1-ok> delete osprofile s10
    N1-ok> delete os s10
    N1-ok> show os
    No items found.
    N1-ok> show osprofile
    No items found.
Next Steps

You will need to copy new OS distributions and create new OS profiles. See Copying OS Distributions and Flash Archives in Sun N1 System Manager 1.3 Operating System Provisioning Guide and To Create an OS Profile in Sun N1 System Manager 1.3 Operating System Provisioning Guide. For OS distributions and profiles based on the Microsoft Windows operating system, see Chapter 3, Provisioning Windows Operating Systems, in Sun N1 System Manager 1.3 Operating System Provisioning Guide.

Alternatively, restore your previous OS distributions as described in To Backup and Restore OS Distributions.

ProcedureTo Backup and Restore OS Distributions

Steps
  1. Using any file level backup and restore program, back up the following directories.

    For Linux, back up the /var/opt/sun/scs/share/allstart directory.

    For the Solaris OS, back up the /var/opt/SUNWscs/share/allstart directory.

  2. Back up the /tftpboot directory for both Linux and the Solaris OS.

  3. Restore the N1 System Manager as described in To Restore Database and Configuration Files.

  4. Restore the directories described in steps 1 and 2.