The SPD Server Table Restore Utility spdsrstr

spdsrstr Description

The restore utility spdsrstr uses a backup file to restore a specified set of SPD Server tables. Tables must meet restore requirements or the spdsrstr utility bypasses them. The spdsrstr utility can also provide a list of the tables in the backup file that are eligible for restoration.
The restore process is different depending on the type of backup that is being restored:
  • When an incremental backup is restored, only the incremental changes to the observations are applied.
  • When a full backup is restored, the table is created with the attribute settings that existed when the full backup was performed, and then all of the rows are added.

spdsrstr Requirements

You must meet the following requirements when you use the spdsrstr utility to restore a table:
  • The table to be restored must be identical to the table that was backed up. The name and creation date of the table to be restored must match the name and creation date of the backed up table.
  • You must perform incremental table restores in the same order as the incremental backups were performed.
  • The table must not have been modified between the incremental restore dates, which assures that the table is returned to the exact state at time of backup.
  • The backup file (regardless of its file extension type) must be available.
If a table does not meet all of the criteria, spdsrstr prints a warning message to stdout and does not restore the table. If spdsrstr is restoring multiple tables, it restores only the tables that meet the restore criteria.

spdsrstr Syntax

spdsrstr -d <dom> -h <host> {-f <fullfile> | -e <extfile>} [-hash]
 [-r <count>] [-a | -aforce] [-aonly] [-n] [-q] [-s <serv>]
 [-u <user>] [-p <passwrd>] [-proj <dir>] [table ...]

spdsrstr -v -d <dom> -h <host> {-f <fullfile> | -e <extfile>}
 [-s <serv>] [-u <user>] [-p <passwrd>] [-proj <dir>] [table ...]

spdsrstr -t {-f <fullfile> | -e <extfile>} [table...]

spdsrstr -help
spdsrstr
restores all or selected tables from a backup file.
spdsrstr -t
prints a table of contents for a backup file. This file indicates when the backup file was created and the type of backup that was performed. If a full backup was performed, the file includes the number of indexes. For each table that was backed up, the file specifies the name, backup sequence, and the number of columns and records that are in the table.
spdsrstr -v
verifies that all or selected tables from a backup file can be restored, but does not do the actual restore.

spdsrstr Options

-a
restores the backed up domain ACL (access control list) files if they do not already exist.
-aforce
restores the backed up domain ACL files if they do not exist or overwrites the current files if they do exist.
Note: To ensure that the domain ACL files are consistent with the last file that was restored, use this option when you are restoring multiple files with the -e option.
-aonly
restores only the domain ACL files, and nothing else.
-d
the SPD Server LIBNAME domain.
Note: The system that performs the restore must be able to access the physical path for the domain locally or through a network connection.
-e <extfile>
the backup filename prefix as specified in spdsbkup that you use to restore all backup files in the directory with the name <extfile>_BK_ddmmmyyyy_hhmmss.0.0.0.spds. The backup files are restored in order from oldest to newest as determined by the ddmmmyyyy_hhmmss component of the filename.
-f <fullfile>
the name of the backup file that contains the tables to restore.
Note: The filename must be the full filename (including its extension) that was created by the SPD Server backup utility.
-h
the host SPD Server to use for the backup.
-hash
prints a hash sign (#) to stdout for each 256K compressed block that is read from the backup file.
-n
specifies that indexes should not be created for a full restore of a table that was backed up with index information.
-p
the user password.
-proj <dir>
the domain project directory.
-q
Runs spdsrstr in quiet mode, which includes only error and warning messages in the output during a backup operation.
-r
Specifies the number of times spdsrstr retries accessing tables that are not available during a restore operation because they were in Query or Update mode. The spdsrstr utility cannot restore a table if that table is in Query or Update mode when spdsrstr accesses it. The utility pauses 5 seconds, and then retries the table if it was in Query or Update mode. The default retry count is 1.
-s
the port number of the name server. If you do not specify this option, the default value is spdsname.
-u
the user name.
-v
verifies which tables in the backup file can be restored, but do not actually perform the restore operations.
[Table ...]
the list of tables to restore from the backup file. If you do not specify any tables, all the tables in the file are restored.
Note: The list of tables must be the last option that you specify in your spdsrstr command.

spdsrstr Return Values

When spdsrstr exits, it generates a return value. If the return value is 0, the utility was successful. If the return value is 1, one or more data sets could not be restored. In that case, examine your SAS log for warning information. If the return value is 2, a critical error caused the process to terminate early. Examine your SAS log for warning and error information.

spdsrstr User Messages

Three basic types of SPD Server spdsrstr backup user messages can appear in your SAS log:
  • Successful Restore
    If spdsrstr successfully restores a table, it writes notes to stdout, unless the -q option is specified. The notes include summary information such as the name of the table that was restored, the number of observations that were restored, and whether the restore that was performed was a full restore or an incremental restore.
  • Warning: Table Cannot Be Restored
    If spdsrstr cannot restore a table, it prints a warning message that states why the table could not be restored. No tables are restored after the failure.
  • Failed Restore
    If the spdsrstr utility detects a serious failure condition, it stops the restore process and prints an error message that states the reason for the failure.