SAS Metadata Server Backup Tasks

Credential Requirements for Administering Metadata Server Backups

To administer metadata server backups in SAS Management Console, you must be an unrestricted user, a user who is in the SAS Administrators group, or a user who is a member of the Metadata Server: Operation role. The tasks that require these credentials include modifying the backup schedule or the backup configuration, running ad hoc backups, and executing a metadata server recovery.

Modifying the Metadata Server Backup Schedule

If the default backup schedule for the metadata server is not appropriate for your site, you can change it using SAS Management Console. On the Plug-ins tab, navigate to Environment Managementthen selectMetadata Managerthen selectMetadata Utilitiesthen selectServer Backup. Then right-click Server Backup and select Backup Schedule.
The following dialog box appears:
Backup Schedule dialog box with default settings
The dialog box displays a row for each time of day that backups are scheduled to run, with check marks indicating the days of the week. The Time column displays the time in a 24-hour time format; for example, 1:00 means 1:00 a.m., and 23:30 means 11:30 p.m. The backup runs when the local time of the metadata server host machine is equal to the specified time. Backups that include the Reorganize Repositories option are listed on separate lines with a check mark in the Reorganize column.
You can modify the schedule as follows:
  • To change the time for an existing row in the schedule, select the Time field and enter the new time using a 24-hour format in server local time.
  • To specify different days of the week in an existing row, select or clear the appropriate check boxes in the columns Sunday through Saturday.
  • To specify whether the repositories are to be reorganized during the backups, select or clear the check box in the Reorganize column. (In most cases, it is not necessary to reorganize the repositories more frequently than once a week.)
  • To add another row to the schedule, click New. Enter the time using a 24-hour time format in server local time. Then select the days of the week that the backup is to be run, and select the Reorganize option if needed. You must select at least one day on each line.
  • To delete an entire row of the schedule, click any cell in the row and then click Delete.
  • To prevent the scheduled backups from running, select the Disable automatic backups check box. The scheduled backups will not run until you clear this check box.
When you are finished, click OK to save the changes.
Tip
If you schedule multiple backups per day, be sure to leave enough time for each backup job to complete before the next scheduled backup starts.

Modifying the Metadata Server Backup Configuration (Backup Location and Retention Policy)

SAS Management Console enables you to modify the backup location as well as the backup retention policy. On the Plug-ins tab, navigate to Environment Managementthen selectMetadata Managerthen selectMetadata Utilitiesthen selectServer Backup. Then right-click Server Backup and select Backup Configuration.
The following dialog box appears:
Backup Configuration dialog box with default settings
You can modify the configuration as follows:
  • To change the backup location, specify either a complete path or a path relative to the MetadataServer directory. If the lowest-level directory in the path does not exist, it will be created. Directories that are higher in the path must already exist.
    Tip
    As a best practice, you should specify a storage device other than the device that is used to store the metadata repositories and the server configuration files. Specifying a separate device will ensure that the backup files and their associated journal files (including the most current journal file) are available in the event of a disk failure.
    Follow these guidelines:
    • You can specify any network location that is accessible from the metadata server. If you want to write the backup files to a path that is remote to the metadata server, then specify a UNC path (for example,\\D2345\C$\SASBackup).
    • If your metadata server is installed on a Windows host, do not specify a mapped drive.
    • Make sure that the process owner for the metadata server has credentials to write to the directory. To protect the integrity of the backups, you might want to deny access for other users.
    • Be sure to include the directory in your regular system backups.
  • To change the number of days that backup files are retained in the backup location, select the appropriate number in the Number of days to retain backups selection box. Each time a successful backup is completed, previous backups that are older than the specified number of days are automatically deleted. The backup history automatically displays the offline status icon (Offline icon (exclamation point in yellow triangle)) for the deleted backups.
    If you do not want backup files to be deleted automatically based on a retention policy, then select 0 in the selection box. If you make this selection, you will need to manually delete files from the backup location on a regular basis to ensure disk space availability.
    Note: The offline status icon (Offline icon (exclamation point in yellow triangle)) is not displayed automatically for backups that you delete manually. To update the status icon for a manually deleted backup, you must open the backup’s Properties dialog box.
When you are finished, click OK to save the changes.

Using SAS Management Console to Run an Ad Hoc Metadata Server Backup

After certain types of events, the metadata server automatically backs itself up. See About Unscheduled Backups of the Metadata Server. As a best practice, you should run an ad hoc backup before and after making other types of major changes to your system. For example, you should run a backup before and after the SAS Deployment Wizard configures the middle and client tiers of your deployment, before and after you change the host name of an existing server, before you delete a repository, and after you add a new repository.
Ad hoc backups use the same server-based backup facility and the same backup options that are used for scheduled backups. To run an ad hoc metadata server backup from SAS Management Console:
  1. On the Plug-ins tab, navigate to Environment Managementthen selectMetadata Managerthen selectMetadata Utilitiesthen selectServer Backup.
  2. Right-click Server Backup and select Run Backup Now.
  3. In the dialog box that appears, you can enter a comment that will appear in the backup history; for example, you might want to state the reason for the ad hoc backup. (The comment is not displayed to clients of the metadata server.)
    You can also select the check box to Reorganize repositories.
    Tip
    The Reorganize Repositories option should be used only during times of little or no user activity. The metadata server is paused during the reorganization process, and any update transactions that are issued during this process will fail.
The backup appears in backup history immediately after the backup process is complete.

Using the MetadataServer Command or backupServer.sas to Run Ad Hoc Metadata Server Backups

You can also run an ad hoc backup by using one of the following methods. Backups that are run using these methods use the same server-based backup facility and the same backup options that are used for scheduled backups.
  • From the directory SAS-configuration-directory/Lev1/SASMeta/MetadataServer, issue one of the following commands:
    • On Windows: MetadataServer backup
    • On UNIX or z/OS: MetadataServer.sh backup
    These commands execute the program backupServer.sas.
  • Directly run the program backupServer.sas. The program is located in SAS-configuration-directory/Lev1/SASMeta/MetadataServer.
The backup appears in backup history in SAS Management Console’s after you select Viewthen selectRefresh. The following comment appears with the backup:
Started by user-ID with the MetadataServer command
Note: You cannot reorganize repositories when running a backup with the MetadataServer command or backupServer.sas.
CAUTION:
The backupServer.sas. program uses the metaparms.sas file, which contains the user ID and the encoded password for the SAS Administrator user. Be sure to protect this file from unauthorized access.

Using Third-Party Scheduling Software to Run Metadata Server Backups

Instead of using the backup scheduling facility that is provided with the metadata server, you can choose to use a third-party scheduling system, as follows:
  1. Use SAS Management Console to disable the metadata server’s scheduled backups, as follows:
    1. On the Plug-ins tab, navigate to Environment Managementthen selectMetadata Managerthen selectMetadata Utilitiesthen selectServer Backup. Then right-click Server Backup and select Backup Schedule.
    2. In the Backup Schedule dialog box, select the Disable automatic backups check box, and click OK.
  2. Set up your scheduling system to run the MetadataServer backup command or to directly execute backupServer.sas on a daily basis.

Troubleshooting Metadata Server Backup Jobs

If a backup does not finish successfully, an e-mail with the subject line Metadata Server Backup Failed is sent to the designated recipients for metadata server alerts. The e-mail specifies the server’s host name, the path to the server’s configuration directory, and the backup name. For details about the failure, refer to the metadata server log and search for the backup name. The log is typically located in the Logs subdirectory of the server’s configuration directory.
When a backup fails, an “x” icon (Invalid backup icon: White “x” in red circle) also appears in the Status column of the backup and recovery history panel in SAS Management Console. To determine why the backup failed or why the backup files have become invalid, right-click the backup and select Properties. In the Properties dialog box, the Error Summary field provides high-level information to help resolve the problem. If more details are available, then the Full Report button is activated. Click this button to obtain a text report that you can browse, copy, and paste.
The ConfigurationFiles subdirectory of each backup contains files called MetadataServerBackupHistory.xml, MetadataServerBackupConfiguration.xml and MetadataServerRecoveryManifest.xml. In addition, the backup directory contains the MetadtaServerBackupManifest.xml file. These files might be useful to SAS Technical Support if you require troubleshooting assistance.