SAS 9.1.3 Intelligence Platform: System Administration Guide
SAS 9.1.3 Intelligence Platform: System Administration Guide
SAS 9.1.3 Intelligence Platform: System Administration Guide
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
54 Example: Backup Program on Windows, Using Alternating Destinations R Chapter 7<br />
Example: Backup Program on Windows, Using Alternating Destinations<br />
This example program creates one backup image on machine D1234 and seven days<br />
of backup images on machine D2345. As a result, multiple restoration options are<br />
available if the backups become corrupted. The example includes two executions of<br />
%OMABAKUP:<br />
3 The first execution stores the backup files on the metadata server host (D1234).<br />
These backup files are overwritten every day, and they represent the most recent<br />
backup image.<br />
3 The second execution stores the backup files on a different machine (D2345). The<br />
name of the backup directory varies depending on the day of the week. The<br />
backup directory is specified as Dmt01 Repos Backups\&day, where &day is a<br />
directory named Sun, Mon, Tue, Wed, Thu, Fri, orSat.<br />
/* These system options establish a connection to the metadata server */<br />
options metaserver="D1234"<br />
metaport=8561<br />
metaprotocol="bridge"<br />
metauser="administrative-userID"<br />
metapass="encoded-password"<br />
metarepository="Foundation";<br />
/* This %OMABAKUP command creates a backup on the D1234 machine in<br />
C:\<strong>SAS</strong>\config-dir-name\Lev1\<strong>SAS</strong>Backup */<br />
%omabakup(DestinationPath="C:\<strong>SAS</strong>\config-dir-name\Lev1\<strong>SAS</strong>Backup",<br />
ServerStartPath="C:\<strong>SAS</strong>\config-dir-name\Lev1\<strong>SAS</strong>Main",<br />
RposmgrPath="MetadataServer\rposmgr")<br />
/*Daily backups are stored at different locations on a D2345 machine,<br />
depending on the day of the week*/<br />
data _null_;<br />
/* Function to get the day of the week */<br />
dayofweek = weekday(date());<br />
/* Using the case and select statement for the day of the week */<br />
select (dayofweek);<br />
when (1) call symput("day","Sun");<br />
when (2) call symput("day","Mon");<br />
when (3) call symput("day","Tue");<br />
when (4) call symput("day","Wed");<br />
when (5) call symput("day","Thu");<br />
when (6) call symput("day","Fri");<br />
when (7) call symput("day","Sat");<br />
otherwise;<br />
end;<br />
run;<br />
%put _user_;<br />
%put &day;<br />
/*This command creates backups on the D2345 machine */<br />
%omabakup(DestinationPath="\\D2345\Dmt01 Repos Backups\&day",<br />
ServerStartPath="C:\<strong>SAS</strong>\config-dir-name\Lev1\<strong>SAS</strong>Main",<br />
RposmgrPath="MetadataServer\rposmgr")