Using spdsrstr

Syntax for the spdsrstr Utility

spdsrstr -d <domain> -h <host> {-f <fullfile>|-e <extfile>}[-hash][-r <count>]
[-a |-aforce][-aonly][-n][-q][-s <service>][-u <user>][-p <password>]
[-proj <directory>][table ...]
spdsrstr -t {-f <fullfile>|-e <extfile>}[table...]
spdsrstr -v -d <domain> -h <host> {-f <fullfile>|-e <extfile>}[-s <service>]
[-u <user>][-p <password>][-proj <directory>][table ...]

spdsrstr

restores all or selected tables from a backup file.

spdsrstr -t

prints a table of contents for a backup file. This table of contents file reports 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.

Options for the spdsrstr Utility

-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 <domain>

specifies the server domain that you want to restore.

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>

specifies 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.spds9. The backup files are restored in order from oldest to newest as determined by the ddmmmyyyy_hhmmss component of the filename.

-f <fullfile>

specifies 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 <host>

specifies host name of the name server. If you do not specify this option, the default value is SpdsName.

-hash

specifies to print 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 <password>

specifies the user password.

-proj <directory>

specifies the domain project directory.

-q

runs spdsrstr in quiet mode, which includes only error and warning messages in the output during a restore operation.

-r <count>

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 <service>

specifies the port number of the name server. If you do not specify this option, the default port number of the name server is 5400.

-u <user>

specifies the SPD Server user ID of the user. Used in conjunction with the -P option.

[table ...]

specifies 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.

Return Values for the spdsrstr Utility

When spdsrstr exits, it generates a return value.

0

indicates the restore was successful.

1

indicates one or more tables could not be restored. Examine your SAS log for warning messages.

2

indicates a critical error caused the process to terminate early. Examine your SAS log for warning and error messages.

Log Messages for the spdsrstr Utility

These spdsrstr 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 rows 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.
Last updated: February 3, 2017