You can use the SAS
PROC SPDO spdscmd to
run the SPD Server backup and restore utilities. There is one constraint:
you must submit the command using an SPD Server LIBNAME that has 'special'
privileges. Backup and restore utilities require privileged access.
To grant 'special', privileges, you must specify the LIBNAME option
ACLSPECIAL=YES
.
When you execute commands
using the PROC SPDO
spdscmd, the current
working directory is the root directory of SPD Server. Output messages
from the commands are echoed to the SAS log. In the next example,
the SPD Server incremental backup and restore utilities reside in
the SPD Server directory. The incremental backup and restore files
are saved in the server directory
/spdsadm/bkup
.
Currently, there is
a limitation when using the
-aforce
option
with PROC SPDO to restore on Windows. The
-aforce
option fails if ACLs exist and there are active connections to the
domain that were specified using the
-d
option
during the restore. ACLSPECIAL= connections to a libref must specify
a domain that is separate from the domain where you are attempting
to restore the ACLs (if the ACLs currently exist). Making ACLSPECIAL=
libref connections that specify the domain where you are attempting
to restore the ACLs will cause the ACL restore operation to fail.
Use the following steps
to use PROC SPDO to execute SPD Server backup and restore utilities:
-
Create an SPD Server
LIBNAME, and specify 'special' privileges.
LIBNAME backup sasspds 'test'
host='sunny'
serv='5150'
user='admin'
passwd='admin'
ACLSPECIAL=YES;
Our example creates
the LIBNAME backup for domain "test" on the host machine 'sunny'.
The port number of the name server is 5150, and 'admin' is the SPD
Server user ID and password.
-
Invoke PROC SPDO for
the LIBNAME.
PROC SPDO lib=backup;
-
Use PROC SPDO remote
system commands to issue backup and restore statements on the server.
The following example performs a full SPD Server backup of the domain
"tstdomn" at 23:30 on February 3, 2008.
spdscmd 'spdsbkup -a -full -d tstdomn -h sunny -s 5150 -f /spdsadm/bkup/test';
The example statement
creates the backup file
/spdsadm/bkup/test_BK_03Feb2008_233000.0.0.spds
and the table of contents file
/spdsadm/bkup/test_TC_03Feb2008_233000
on the server.
-
If a later restore operation
is necessary, specify a run of the SPD Server restore utility to restore
the domain to its last full backup state.
spdscmd 'spdsrstr -aforce -d tstdomn -h sunny -s 5150 -e /spdsadm/bkup/test