| Using the %OMABAKUP Macro to Perform Backups and Restores |
| 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-userID"
metapass="encoded-password"
metarepository="Foundation";
Set the options on the server connection statement as follows:
Specify localhost to connect to the metadata server on the same machine.
Specify the unique port number that identifies your metadata server. The default port number is 8561.
Specify the user ID and password of a user that meets these requirements:
has administrative user status on the SAS Metadata Server
has full operating system access to the MetadataServer directory, the rposmgr directory, and all repository and backup directories
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=sasenc; run;
Specify the name of the default repository. The name that is recommended for all installations is Foundation.
| %OMABAKUP Statement: Reference |
The %OMABAKUP macro copies all of the repositories that are registered on a metadata server and the server's repository manager to a backup location. The macro can also be used to restore repositories from the backup location to the metadata server.
The syntax of a %OMABAKUP macro statement is as follows:
%omabakup(DestinationPath="pathname", ServerStartPath="pathname", RposmgrPath="pathname", <Reorg="Yes|No">, <RepositoryList="repository-name<,...repository-name-n">>, <Restore="Yes|No">, <RunAnalysis="Yes|No">)
Set the options for the %OMABAKUP macro as follows:
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. Specify the absolute pathname of an existing directory; %OMABAKUP will not create the directory for you.
For a restore, specify the pathname of the directory where backups are stored.
The following table provides recommended values for DESTINATIONPATH for each host environment:
| Host Environment | Recommended Value for DESTINATIONPATH |
|---|---|
| Windows | "C:\SAS\config-dir-name\Lev1\SASBackup" |
| UNIX | "installer's-home-dir/SAS/config-dir-name/Lev1/SASBackup" |
| z/OS | "/usr/lpp/SAS/config-dir-name/Lev1/SASBackup" |
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.
The following table provides the value of SERVERSTARTPATH for default installations in each host environment:
| Host Environment | Value in Default Installation |
|---|---|
| Windows | "C:\SAS\config-dir-name\Lev1\SASMain" |
| UNIX | "installer's-home-dir/SAS/config-dir-name/Lev1/SASMain" |
| z/OS | "/usr/lpp/SAS/config-dir-name/Lev1/SASMain" |
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:
MetadataServer/rposmgr
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]](../common.hlp/images/cautend.gif)
NO (or N) if you want to copy the repositories as they are. This is the default value.
is an optional parameter that you can use if you need to restore the repository manager. The repository manager must be identified as REPOSMGR.
As a default, the RESTORE option of %OMABAKUP does not copy the repository manager. However, in some cases it might be necessary to restore it. For important guidance in using this parameter, see Restoring the Repository Manager.
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 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. This is the default value.
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. This is the default value.
For more information about this option, see Using %OMARUNAN (or the RUNANALYSIS Option of %OMABAKUP) to Optimize Memory Usage.
Note: The pathnames that are used in the
DESTINATIONPATH, SERVERSTARTPATH, and RPOSMGRPATH parameters cannot contain
embedded asterisks (*), backslashes (\), question marks (?), brackets ([]),
or single or double quotation marks (with the exception that the backslash
is supported as a directory delimiter on hosts that support the backslash
as a delimiter). ![[cautionend]](../common.hlp/images/cautend.gif)
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.