Manually Restoring an Unresponsive SAS Metadata Server |
If the SAS Metadata Server is not responding to client requests, then you cannot use the %OMABAKUP macro or the Backup Wizard to restore the repository manager and the foundation repository. Instead, you must stop the server and use operating system commands to restore these items. You must then use %OMABAKUP to restore any custom and project repositories.
Follow these detailed steps to restore a metadata server that is not responding to client requests:
Follow the steps in Checking the Access State of the SAS Metadata Server to ensure that the server is stopped.
Make sure that you have the appropriate user credentials, as described in Ensuring Appropriate User Credentials.
Open the directory where the SAS Metadata Server is started. In a default installation on Windows, this directory is SAS-configuration-directory\Lev1\SASMeta\MetadataServer. In a default installation on z/OS or UNIX, this directory is SAS-configuration-directory/Lev1/SASMeta/MetadataServer.
Make sure that the omaconfig.xml file, adminUsers.txt file, trustedUsers.txt file, and logconfig.xml files are intact. If they are not intact, then use operating system commands to restore them from the backup location to the metadata server startup directory.
If you do not have backup copies of these files, then you must use the SAS Deployment Wizard to re-install the metadata server before performing the rest of this procedure.
Use the appropriate operating system command to delete the current
MetadataRespositories directory and its contents:
Windows
command:
rmdir /S MetadataRepositories
UNIX and z/OS commands:
rm -rf MetadataRepositories
Use the appropriate operating system command to create a new,
empty MetadataRespositories directory:
Windows
command:
mkdir MetadataRepositories
UNIX and z/OS commands:
mkdir MetadataRepositories
Use the appropriate operating system command to delete the current rposmgr directory and its contents:
Windows
command:
rmdir /S rposmgr
UNIX and z/OS commands:
rm -rf rposmgr
Use the following command to change directories to the backup directory.
cd backup-location
Use the appropriate operating system command to copy the backup of the repository manager to a subdirectory called rposmgr in the metadata server startup directory.
Windows command:
xcopy source-directory destination-directory /C /I /H /K /O /X /Y
UNIX and z/OS command:
cp -rp source-directory destination-directory
For source-directory, specify the subdirectory that contains the backup of the repository manager. If you used %OMABAKUP or the Backup Wizard to create the backup, then the name of this subdirectory is REPOSMGR.
For destination-directory, specify the full path of the metadata server startup directory, followed by the subdirectory name rposmgr.
Here is an example Windows command to restore the repository manager from a backup that was created by %OMABAKUP or the Backup Wizard:
xcopy REPOSMGR "C:\SAS\Config\Lev1\SASMeta\MetadataServer\rposmgr" /C /I /H /K /O /X /Y
Here is an example UNIX or z/OS command to restore the repository manager from a backup that was created by %OMABAKUP or the Backup Wizard:
cp -rp REPOSMGR "/opt/sas/Config/Lev1/SASMeta/MetadataServer/rposmgr"
Use the appropriate operating system command to copy the backup data sets for the foundation repository to the metadata server startup directory.
Windows command:
xcopy source-directory destination-directory /C /I /H /K /O /X /Y
UNIX and z/OS command:
cp -rp source-directory destination-directory
For source-directory, specify the Foundation subdirectory, which contains the backup data sets for the foundation repository.
For destination-directory, specify the full path of the metadata server startup directory, followed by the subdirectory names MetadataRepositories and Foundation.
Here is an example Windows command to restore the foundation repository:
xcopy Foundation "C:\SAS\Config\Lev1\SASMeta\
MetadataServer\MetadataRepositories\Foundation" /C /I /H /K /O /X /Y
Here is an example UNIX or z/OS command to restore the foundation repository:
cp -rp Foundation "/opt/sas/Config/Lev1/SASMeta/MetadataServer/
MetadataRepositories/Foundation"
Use the instructions in Operating Your Servers to start the metadata server.
If the metadata server includes any additional repositories (including custom or project repositories), then use the RESTORE option of %OMABAKUP to perform a full metadata server restore. For custom and project repositories, it is important to use the %OMABAKUP macro instead of operating system commands. The macro will ensure that each repository is restored to the correct path, as specified in the repository manager.
You can use either of the following methods to perform this step:
Run the restoreServer.sas program that was provided with your installation. Before running the program, make sure that it accesses the same backup directory that you accessed in steps 9 and 10. For details, see Running the backupServer.sas and restoreServer.sas Programs.
Write and execute a custom %OMABAKUP program that includes the RESTORE option. For an example, see Example: Program to Restore All Repositories and the Repository Manager. Be sure to access the same backup directory that you accessed in steps 9 and 10.
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.