2.1 Backing Up and Restoring Data From a Legacy SGD Installation

Caution

The procedures in this section are for backing up data from an SGD 5.4 installation on any supported platform and restoring the data to an SGD 5.5 installation on Oracle Linux.

Backup and restore is not supported for other versions of SGD. However, you can upgrade to version 5.4 and then use the procedures described in this section.

Backing up and restoring data for a legacy SGD installation is done using scripts which are provided by the oracle-sgd-backup package. See Section 2.1.1, “About the Backup and Restore Scripts”.

Note

Backup and restore can be used for SGD server hosts and SGD Gateway hosts.

Backup and restore can be done on the same host.

You can back up data from a host and then restore it to a different host. See Section 2.1.5, “Backing Up and Restoring to a Different Host”.

An example of a backup and restore workflow is as follows:

  • Back up data from an SGD 5.4 host, using the backup script.

  • Uninstall SGD 5.4 on the host.

  • Install SGD 5.5 on the same host.

  • Restore the backup data from the SGD 5.4 installation, using the restore script.

Backup and restore is supported for the following deployments:

2.1.1 About the Backup and Restore Scripts

Backup and restore scripts are created automatically when you install the oracle-sgd-backup package on a host. For example:

  • On a Linux host:

    # yum install oracle-sgd-backup
  • On an Oracle Solaris host:

    # pkgadd -d /tempdir/oracle-sgd-backup-version.SunOS.pkg

The scripts are created in the /opt/sgd-backup/bin directory.

Backing Up SGD Data

To back up data from an SGD installation, run the following command:

# /opt/sgd-backup/bin/backup.sh

This command creates one or more encrypted tar.gz file archives.

Each file archive has a unique name that includes a time stamp ID. For example:

  • For an SGD server:

    sgd-backup-encrypted-id.tar.gz

  • For an SGD Gateway:

    sgdg-backup-encrypted-id.tar.gz

A corresponding log file is created for each backup file archive. The log file has the same unique name as the file archive, with a .log file extension.

By default, backup archives and log files are created in the /opt/sgd-backup/data directory.

Restoring SGD Data

An encrypted backup file archive can only be restored using the SGD restore script.

To restore data to an SGD installation, run the following command:

/opt/sgd-backup/bin/restore.sh --serverfile /opt/sgd-backup/data/archive-name.tar.gz

where archive-name.tar.gz is the backup file archive.

A log file for the restore process is created in the /opt/sgd-backup/data directory. The log file is called sgd-restore-encrypted-id.log

Running the Backup Script on Oracle Solaris Hosts

The standard tar command on Oracle Solaris has a filename limit of 155 characters. For best results, use the GNU tar command instead.

Before you run the backup script, configure use of the GNU tar command as follows:

  • Oracle Solaris 10 platforms:

    $ tar() { /usr/sfw/bin/gtar "$@"; }
    $ export -f tar
  • Oracle Solaris 11 platforms:

    $ tar() { /usr/gnu/bin/tar "$@"; }
    $ export -f tar

2.1.2 Backing Up and Restoring for an SGD Array

The following procedure describes how to back up and restore an SGD array with one or more array members. In this procedure, data is backed up and then restored using the same host.

  1. Install the oracle-sgd-backup package on each host.

  2. Stop SGD services on each array member.

    # tarantella stop

    Stop all secondary servers and then stop the primary server.

  3. Perform the following steps on each host.

    1. Run the SGD backup script.

      # /opt/sgd-backup/bin/backup.sh

      A backup file archive with a unique name is created.

    2. Uninstall the legacy SGD server installation.

      # tarantella uninstall --purge
    3. Install the latest version of the SGD server.

      # yum install oracle-sgd-server
    4. Run the SGD restore script. For example:

      # /opt/sgd-backup/bin/restore.sh \
      --serverfile /opt/sgd-backup/data/sgd-backup-encrypted-id.tar.gz

      where --serverfile specifies the location of the backup archive.

  4. Start the SGD servers in the array. Run the following command on each array member:

    # tarantella start

    Start the primary server first. Then start all secondary servers.

  5. Check the array status.

    Run the following command on each array member.

    # tarantella status

2.1.3 Backing Up and Restoring for a Single Host Gateway Deployment

The following procedure describes how to back up and restore a single host Gateway deployment. In this deployment, the SGD Gateway and a single SGD server are installed on the same host.

In this procedure, data is backed up and then restored using the same host.

  1. Install the oracle-sgd-backup package on the host.

  2. Stop SGD services on the host.

    1. Stop the SGD server.

      # tarantella stop
    2. Stop the SGD Gateway.

      # /opt/SUNWsgdg/bin/gateway stop
  3. Run the backup script on the host.

    # /opt/sgd-backup/bin/backup.sh

    Two backup files are created, each with a unique name. One backup file is for the SGD server, the other is for the SGD Gateway.

  4. Uninstall the legacy SGD components.

    1. Uninstall the SGD server.

      # tarantella uninstall --purge
    2. Uninstall the SGD Gateway.

      # /opt/SUNWsgdg/bin/gateway uninstall

      Remove the Gateway installation directory:

      # rm -fr /opt/SUNWsgdg
  5. Install the SGD server.

    # yum install oracle-sgd-server
  6. Install the SGD Gateway.

    # yum install oracle-sgd-gateway
  7. Run the restore script on the host. For example:

    # /opt/sgd-backup/bin/restore.sh \
    --serverfile /opt/sgd-backup/data/sgd-backup-encrypted-id.tar.gz \
    --gatewayfile /opt/sgd-backup/data/sgdg-backup-encrypted-id.tar.gz

    where --serverfile specifies the location of the backup archive for the SGD server and --gatewayfile specifies the location of the backup archive for the SGD Gateway.

  8. Start SGD services on the host.

    # tarantella start
    # /opt/SUNWsgdg/bin/gateway start
  9. Check the status of SGD services on the host.

    • For the SGD server:

      # tarantella info
    • For the SGD Gateway:

      # /opt/SUNWsgdg/bin/gateway status

2.1.4 Backing Up and Restoring for a Basic SGD Gateway Deployment

The following procedure describes how to back up and restore a basic SGD Gateway deployment. In this deployment, an SGD Gateway host acts as the network entry point for an SGD array.

In this procedure, data is backed up and then restored using the same host.

  1. Install the oracle-sgd-backup package on each host.

  2. Stop SGD services on each host.

    1. Stop SGD services on each array member.

      # tarantella stop

      Stop all secondary servers and then stop the primary server.

    2. Stop the SGD Gateway.

      # /opt/SUNWsgdg/bin/gateway stop
  3. Perform the following steps on each host.

    1. Run the SGD backup script.

      # /opt/sgd-backup/bin/backup.sh

      A backup file archive with a unique name is created.

    2. Uninstall the legacy SGD component.

      To uninstall an SGD server:

      # tarantella uninstall --purge

      To uninstall the SGD Gateway:

      # /opt/SUNWsgdg/bin/gateway uninstall

      Remove the Gateway installation directory:

      # rm -fr /opt/SUNWsgdg
    3. Install the latest version of SGD components.

      To install an SGD server:

      # yum install oracle-sgd-server

      To install the SGD Gateway:

      # yum install oracle-sgd-gateway
    4. Run the SGD restore script.

      For the SGD Gateway:

      # /opt/sgd-backup/bin/restore.sh \
      --gatewayfile /opt/sgd-backup/data/sgdg-backup-encrypted-id.tar.gz

      where --gatewayfile specifies the location of the backup archive for the SGD Gateway.

      For an SGD server:

      # /opt/sgd-backup/bin/restore.sh \
      --serverfile /opt/sgd-backup/data/sgd-backup-encrypted-id.tar.gz

      where --serverfile specifies the location of the backup archive for the SGD server.

  4. Start SGD services on each host.

    1. Start the SGD servers in the array. Run the following command on each array member:

      # tarantella start

      Start the primary server first. Then start all secondary servers.

    2. Start the SGD Gateway.

      # /opt/SUNWsgdg/bin/gateway start
  5. Check the status of SGD services on each host.

    • For the SGD servers:

      # tarantella info
    • For the SGD Gateway:

      # /opt/SUNWsgdg/bin/gateway status

2.1.5 Backing Up and Restoring to a Different Host

The following procedure describes how to back up data from a legacy SGD host, called the source, and restore it to a different host, called the target.

  1. Install the oracle-sgd-backup package on the source host and target host.

  2. On the source host, perform the following steps.

    1. Stop SGD services.

      # tarantella stop
    2. Run the SGD backup script.

      # /opt/sgd-backup/bin/backup.sh

      A backup file archive with a unique name is created.

    3. Copy the backup file archive from the source host to the target host.

  3. On the target host, perform the following steps.

    1. Install the latest version of the SGD server.

      # yum install oracle-sgd-server
    2. Run the SGD restore script. For example:

      # /opt/sgd-backup/bin/restore.sh \
      --serverfile /tmp/sgd-backup-encrypted-id.tar.gz

      where --serverfile specifies the location of the backup archive.

    3. Start SGD services.

      # tarantella start
    4. Check the status of SGD services.

      # tarantella info

2.1.6 Backing Up and Restoring Customized Components

Some customized components of an SGD installation may need to be backed up and restored manually. For example:

  • Customized login scripts.

  • SGD web server customizations, such as changes to the Apache web server or Tomcat JSP container configuration files.

  • Special configuration for the following user authentication methods:

    • SecurID authentication

    • Web authentication

    • Single Sign-on authentication

To extract individual files from an SGD backup archive, you must first unencrypt and unpack the backup file archive. For example:

# /opt/tarantella/bin/bin/openssl enc -d -aes256 \
  -in sgd-backup-encrypted-id.tar.gz | tar xvz -C

Individual files can then be obtained by unpacking the required component file archive. For example, to obtain SSL certificates used for secure intra-array communication:

# tar xvzf sgd-var-info-certs-backup.tar.gz