Show TOC

Procedure documentationBacking Up and Restoring your SAP System on UNIX Locate this document in the navigation structure

 

This procedure describes how to perform a full offline backup of an SAP system and how to use the backup data for a restore.

Prerequisites

The SAP system and database are stopped. For more information, see Starting and Stopping the Application Server Java (AS Java).

Procedure

Backing Up Your SAP System
  1. Perform a full database backup.

    For more information, see Database Administration.

  2. Back up the home directories of the operating system users:

    • <sapsid>adm

    • Database-specific operating system user(s)

  3. Back up the following file systems of your SAP system:

    • /usr/sap/<SAPSID>

    • /usr/sap/trans

    • /<sapmnt>/<SAPSID>

    Note Note

    For more information about the SAP system directories available under these file systems, see SAP System Directories on UNIX.

    End of the note.

    Proceed as follows to perform the backup:

    Note Note

    The UNIX commands used in this procedure work on all hardware platforms. For more information about operating system-specific backup tools, see your operating system documentation.

    End of the note.
    1. Log on as user root.

    2. Manually create a compressed tar archive that contains all installed files:

      • Saving to tape:

        tar —cf — <file_system> | compress —c> <tape_device>

      • Saving to the file system:

        tar —cf — <file_system> | compress —c> ARCHIVENAME.tar.Z

      Note Note

      On Linux, you can also execute the following command to manually create a compressed GNU tar archive that contains all installed files and save it to the file system:

      tar —czf <ARCHIVENAME>.tgz <file_system>

      End of the note.
  4. Back up the operating system using operating system tools.

    This saves the structure of the system and all configuration files, such as file system size, configuration of the logical volume manager, and database configuration data.

Restoring the Backup

If required, you can restore the data that you previously backed up.

Caution Caution

Check for modifications in the existing parameter files before you overwrite them when restoring the backup.

End of the caution.
  1. Log on as user root.

  2. Go to the location in your file system where you want to restore the backup image.

  3. Proceed as follows to restore the backup:

    Note Note

    The UNIX commands used in this procedure work on all hardware platforms. For more information about operating system-specific backup tools, see your operating system documentation.

    End of the note.
    • Execute the following command to restore the data from tape:

      cat <tape_device> | compress —cd | tar —xf —

    • Execute the following command to restore the data from the file system:

      cat ARCHIVENAME.tar.Z | compress —cd | tar —xf —

    Note Note

    If you want to restore the data from a GNU tar archive on Linux, you have to execute the following command:

    tar —xzf <ARCHIVENAME>.tgz

    End of the note.
  4. Restore your database backup.

    For more information, see Database Administration.