Previous Page | Next Page

Using the %OMABAKUP Macro to Perform Backups and Restores

What %OMABAKUP Does

When you use the %OMABAKUP macro with the RESTORE parameter set to NO (which is the default setting), the macro does the following:

  1. pauses the metadata server to an Offline state. The server does the following when it is paused to Offline:

    • retains all active client connections.

    • temporarily changes the access state of each repository to Offline.

    • temporarily stops receiving client requests to read or write metadata. If a client application submits a new request, the client displays a message indicating that the server is paused.

    • flushes updated metadata from the server's memory and writes the updated metadata to the metadata repository.

    • closes the SAS data sets that serve as repository containers.

  2. creates the directory that is specified in the DESTINATIONPATH option if the directory does not already exist.

  3. creates a subdirectory called REPOSMGR in the destination path, and uses PROC COPY to copy the repository manager to this subdirectory.

  4. determines which repositories to back up based on their registered access mode, as follows:

    • All Online repositories are automatically included.

    • All Administration repositories are automatically included.

    • All ReadOnly repositories are included, unless you set the DISABLEREADONLYBACKUP option to YES.

      Note:   

      • When you use the Backup Wizard to create a backup job, you cannot back up a foundation repository that has a registered access mode of READONLY. If your foundation repository is registered as READONLY, then you must change its registered access mode to Online before running the backup. See Change the Properties of a Metadata Repository.

      • When you use the Backup Wizard to create a backup job, READONLY project repositories and custom repositories are included only if you select the option Back Up READONLY Custom and Project Repositories.

        [cautionend]
    • All Offline repositories are included, unless you set the DISABLEOFFLINEBACKUP option to YES.

      Note:   When you use the Backup Wizard, you cannot back up Offline repositories.  [cautionend]

  5. performs the following steps for each repository that is being backed up:

    1. creates a subdirectory in the location that is specified in the DESTINATIONPATH parameter. The subdirectory is named with the value of the repository's Name attribute.

      For example, if the name of the repository is Foundation and the directory specified in DESTINATIONPATH is SASBackup, then the macro creates a subdirectory called SASBackup/Foundation.

      If the repository name contains characters that Windows or UNIX does not allow in directory names, %OMABAKUP replaces the unsupported characters with underscores when creating the directory name. These characters include the following: \, /, :, *, ?, ", ', <, >, [, ], and |.

      Note:   %OMABAKUP supports repository Name values of up to 32 characters.  [cautionend]

    2. uses PROC COPY to copy the repository's data sets to the subdirectory.

    3. creates a file called metimdb.sas7bcat for each repository in its registered location. This file is a control data set that specifies how character variables in repository data sets are to be treated in memory. The data set is used to load repositories back into memory when client activity is resumed on the metadata server.

    4. creates a DS_VCHAR data set in the subdirectory if the RUNANALYSIS option is specified. For information about DS_VCHAR data sets, see Using %OMARUNAN (or the RUNANALYSIS Option of %OMABAKUP) to Optimize Memory Usage.

  6. creates or updates the following catalogs in the destination directory:

    • oma_backup.sas7bcat, which stores information about repository source and target destinations

    • oma_varan.sas7bcat, which contains a job that SAS processes can use to analyze repository data sets in the backup subdirectories.

  7. uses operating system commands to copy the metadata journal file (MetadataJournal.dat) to the backup destination, unless the BACKUPMETADATAJOURNALFILE option is set to NO .

  8. uses operating system commands to copy the metadata server's configuration files to the backup destination, unless DISABLECONFIGURATIONFILEBACKUP is set to YES. These files include omaconfig.xml, adminUsers.txt, trustedUsers.txt, and logconfig.xml.

  9. returns the metadata server to Online status. The metadata server resumes the handling of client requests.

To perform a restore, you can use %OMABAKUP with the RESTORE option. In SAS 9.2, the RESTORE option of %OMABAKUP restores the repository manager, the metadata repositories, and the metadata server's configuration files. The metadata journal file is not restored.

Previous Page | Next Page | Top of Page