Previous Page | Next Page

Using the %OMABAKUP Macro to Perform Backups and Restores

%OMABAKUP Macro: Reference


Server Connection Statement: Reference

Before you can execute the %OMABAKUP macro, you must connect to a SAS Metadata Server. Use the following server connection statement to connect to the metadata server:

OPTIONS METASERVER="localhost"
METAPORT=port-number
METAPROTOCOL="bridge"
METAUSER="administrative-user-ID"
METAPASS="encoded-password"
METAREPOSITORY="Foundation";

Set the options on the server connection statement as follows:

METASERVER

Specify localhost to connect to the metadata server on the same machine.

METAPORT

Specify the unique port number that identifies your metadata server. The default port number is 8561.

METAPROTOCOL

Specify the network protocol for connecting to the metadata server. The default value, BRIDGE, is the only value that is valid in SAS 9.2.

METAUSER

Specify the user ID and password of a user that meets these requirements:

  • is assigned to the Metadata Server: Operation role

  • has full operating system access to the MetadataServer directory, the rposmgr directory, and all repository and backup directories

METAPASS

Specify the password for the METAUSER. The password should be encrypted using SAS proprietary 32-bit encryption. To obtain the encrypted password, use PROC PWENCODE.

For example, to encrypt the password "SASmeta1," you would submit this code in the SAS Program Editor:

proc pwencode in="SASmeta1" method=sas002;
run;
METAREPOSITORY

Specify the name of the default repository. The name that is recommended for all installations is Foundation.

Note:   Instead of directly coding the connection options, you can include the metaparms.sas file, as illustrated in Example: Program for Full Backup.  [cautionend]


%OMABAKUP Statement: Reference

The %OMABAKUP macro copies all of the repositories that are registered on a metadata server, the server's repository manager, and the server's configuration files to a backup location. The macro can also be used to restore the repositories, the repository manager, and the server's configuration files from the backup location to the metadata server.

The syntax of an %OMABAKUP macro statement is as follows:

%OMABAKUP(DESTINATIONPATH="pathname",
SERVERSTARTPATH="pathname",
RPOSMGRPATH="pathname",
<REORG="YES|NO">,
<DISABLECONFIGURATIONFILEBACKUP="YES|NO">",
<DISABLEREADONLYBACKUP="YES|NO">,
<DISABLEOFFLINEBACKUP="YES|NO">,
<RESTORE="YES|NO">,
<RUNANALYSIS="YES|NO">,
<BACKUPMETADATAJOURNALFILE="YES|NO">)

Set the options for the %OMABAKUP macro as follows:

DESTINATIONPATH="pathname"

is a required parameter for a backup or a restore.

For a backup, specify the pathname of the directory where backup copies are to be stored. If the directory does not already exist, %OMABAKUP will create the directory for you. If you are using the Backup Wizard, use the Browse button to create the directory.

For a restore, specify the pathname of the directory where backups are stored.

The following values are recommended for DESTINATIONPATH:

  • Windows: SAS-configuration-directory\Lev1\SASMeta\MetadataServer\SASBackup

  • UNIX and z/OS: SAS-configuration-directory/Lev1/SASMeta/MetadataServer/SASBackup

Be sure to include this directory in your site's daily backups.
SERVERSTARTPATH="pathname"

is a required parameter for a backup and a restore. Specify the full path to the directory in which the metadata server process was started. In default installations, the path is as follows:

  • Windows: SAS-configuration-directory\Lev1\SASMeta\MetadataServer

  • UNIX and z/OS: SAS-configuration-directory/Lev1/SASMeta/MetadataServer

RPOSMGRPATH="pathname"

is a required parameter for a backup and a restore. Specify the relative location of the repository manager as defined in the omaconfig.xml file.

The value of RPOSMGRPATH for default installations in Windows, UNIX, and z/OS host environments is as follows:

rposmgr

REORG="YES|NO"

is an optional parameter for a backup that enables you to reclaim unused disk space left from previously deleted metadata objects from SAS metadata repositories.

When metadata is deleted from a SAS metadata repository, the record is removed from both memory and disk. However, the disk space that had been allocated for the record remains in the data set after the record is removed.

Specify one of the following values for this parameter:

  • YES (or Y) if you want to reclaim disk space during the backup operation. (This option is not valid when %OMABAKUP is executed in restore mode.) If you specify this option, %OMABAKUP does the following:

    • re-creates the repository data sets as it copies them to the backup destination, eliminating unused space in the process

    • copies the re-created data sets back to their original locations

    Note:   Because of the overhead that is associated with re-creating the data sets, you might not want to use the REORG option for every backup. Consider using this option once a month and after large amounts of metadata have been deleted.  [cautionend]

  • NO (or N) if you want to copy the repositories as they are.

Default: NO
DISABLECONFIGURATIONFILEBACKUP="YES|NO"

is an optional parameter. If you do not want to back up or restore the metadata server's configuration files, (omaconfig.xml, adminUsers.txt, trustedUsers.txt, and logconfig.xml), then set this parameter to YES. Otherwise, the files will be backed up.

Default: NO
DISABLEREADONLYBACKUP="YES|NO"

is an optional parameter. If you do not want to back up or restore custom and project repositories that have a registered access mode of ReadOnly, then set this parameter to YES. Otherwise, all custom and project repositories that have a registered access mode of ReadOnly will be included in the backup or the restore.

Note:   

  • You cannot use the Backup Wizard to create or run a backup job if the foundation repository has a registered access mode of ReadOnly. You must first change its registered access mode to Online (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]
Default: NO
DISABLEOFFLINEBACKUP="YES|NO"

is an optional parameter. If you do not want to back up or restore repositories that have a registered access mode of Offline, then set this parameter to YES. Otherwise, all Offline repositories will be included in the backup or the restore.

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

Default: NO
RESTORE="YES|NO"

is an optional parameter that enables you to execute %OMABAKUP in restore mode. Specify one of the following values:

  • YES (or Y) to run the %OMABAKUP macro in restore mode. The macro will restore the repository manager and all repositories that are registered in the SAS Metadata Server's repository manager to their registered locations.

  • NO (or N) to run the macro in backup mode.

Note:   In SAS 9.1.3, the RESTORE did not restore the repository manager when it was run in its default mode. In SAS 9.2, the RESTORE option restores the repository manager, all registered repositories, and the metadata server's configuration files by default.  [cautionend]

Default: NO
RUNANALYSIS="YES|NO"

is an optional parameter for a backup that specifies whether to analyze backup copies of repository data sets for information that can be used to optimize the data sets' memory footprint on the metadata server. The analysis is run immediately after client activity is resumed on the SAS Metadata Server.

Specify one of the following values:

  • YES (or Y) to analyze the backup repositories. This option is not valid when %OMABAKUP is executed in restore mode.

  • NO (or N) if you do not want to analyze the backup repositories.

For more information about this option, see Using %OMARUNAN (or the RUNANALYSIS Option of %OMABAKUP) to Optimize Memory Usage.

Default: NO
BACKUPMETADATAJOURNALFILE="YES|NO"

is an optional parameter that you can use to specify whether to back up the metadata journal file. You can set this option to YES only if the JOURNALPATH option is specified in the omaconfig.xml file. (In default installations, the JOURNALPATH option is specified.) For more information, see Configuring Metadata Server Journaling.

Default: YES

Note:   The pathnames that are used in the DESTINATIONPATH, SERVERSTARTPATH, and RPOSMGRPATH parameters cannot contain the following characters:

(Backslashes and forward slashes are supported as directory delimiters on hosts that support them as delimiters.)  [cautionend]

Previous Page | Next Page | Top of Page