METADATA Procedure
Example 9: Use METHOD=STATUS to Get Backup Information
Features: |
METHOD= argument
IN= argument
|
The SAS 9.3 Metadata
Server performs unassisted, scheduled server backups, and supports
roll-forward recovery to a specified point in time. For detailed information
about this server backup utility and its recovery features, see the
SAS Intelligence Platform: System Administration Guide.
The recommended interface
for managing server backups and performing recoveries is the Server
Backup node of SAS Management Console. However, PROC METAOPERATE can
be used to configure and execute backups and recoveries, and PROC
METADATA can be used to get information about the backup configuration,
backup history, and specific backups.
For information about
tasks that can be performed with PROC METAOPERATE, see
Using Backup and Recover XML Elements. The following examples show how to
get information about server backups using METHOD=STATUS.
The SAS 9.3 Metadata
Server backup facility uses four system files in the
SASMeta/MetadataServer
directory
to manage backup and recovery processes.
-
MetadataServerBackupConfiguration.xml
contains the backup configuration and backup schedule.
-
MetadataServerBackupHistory.xml
contains a history of backup and recovery activity.
-
MetadataServerBackupManifest.xml
contains a record of the repositories and files copied in a backup.
-
MetadataServerRecoveryManifest.xml
contains a record of the repositories and files applied in the latest
recovery.
These system files should never be opened directly.
To read the files with PROC METADATA, submit backup-related XML elements
that are supported in the IServer Status method in the IN= argument.
To get your server's backup configuration and backup schedule,
submit the following:
proc metadata
method=STATUS
in='<MetadataServerBackupConfiguration/>';
run;
Here is output from
the request:
NOTE: Response XML:
<MetadataServerBackupConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="MetadataServerBackupConfiguration.xsd">
1<MetadataServer GUID="5FC4B20A-EEFE-449D-AA16-8D7745B0F0C6"/>
2<Schedules><Schedule Event="Backup"
Weekday1="0200" Weekday2="0200R" Weekday3="0200" Weekday4="0200" Weekday5="0200"
Weekday6="0200" Weekday7="0200"/></Schedules>
3<BackupConfiguration BackupLocation="Backups" DaysToRetainBackups="7"
RunScheduledBackups="Y"/></MetadataServerBackupConfiguration>
1 |
The
<MetadataServer> XML element contains the unique metadata server
identifier in a GUID= attribute.
|
2 |
The
<Schedules> XML element contains the backup schedule. For a description of
the schedule attributes and values, see <SCHEDULE EVENT="Backup" WEEKDAYn="timeR"/>. |
3 |
The
<BackupConfiguration> XML element contains values for the BackupLocation=,
DaysToRetainBackups=, and RunScheduledBackups= configuration attributes.
|
To get the backup schedule for Tuesday only, submit the
following:
proc metadata
method=STATUS
in='<Schedule Event="Backup" WeekDay3=""/>';
run;
To get the backup retention policy only, submit the following:
proc metadata
method=STATUS
in='<BackupConfiguration DaysToRetainBackups=""/>';
run;
To list the backup history:
proc metadata
method=STATUS
in='<MetadataServerBackupHistory/>';
run;
To get status information about the last backup from the
history:
proc metadata
method=STATUS
in='<MetadataServerBackupHistory XPath="MetadataServerBackupManifest/Backups/
Backup[POSITION()=LAST()]"/>';
run;
To list the backup manifest of the last successful backup,
submit the following:
proc metadata
method=STATUS
in='<MetadataServerBackupManifest/>';
run;
To list the backup manifest of an earlier backup:The server assumes the backup in the BackupName=
attribute is in the configured backup location.
proc metadata
method=STATUS
in='<MetadataServerBackupManifest BackupName="2010-12-13T00_59_59-05_00"/>';
run;
To list the backup manifest of a backup that is not in
the configured backup location:Specify
the absolute pathname of the backup in the BackupPath= attribute.
proc metadata
method=STATUS
in='<MetadataServerBackupManifest BackupPath="C:/2010-12-08T12_44_21-05_00"/>';
run;
To list the contents of the MetadataServerRecoveryManifest.xml
file:The server maintains a record of
the last recovery only. This manifest is located in the SASMeta/MetadataServer
directory.
proc metadata
method=STATUS
in='<MetadataServerRecoveryManifest/>';
run;
To check the health of the backup scheduler thread:Possible return values are Alive, TimeOut, Down,
or Unconfigured.
proc metadata
method=STATUS
in='<Scheduler Ping=""/>';
run;
Copyright © SAS Institute Inc. All rights reserved.