The RESTORE Statement

To restore a database, use the RESTORE statement.

You must be connected to the utility_db database as DBA to issue this statement.

You must specify the db_file and at least one archive_device.

For db_file you specify the location of the catalog store file for the database (created with the suffix .db by default). You can specify the full path name or a path name relative to the directory where the database was created. If you specify a new path name, the catalog store and any files created relative to it are moved to that location, except for any files you include in a RENAME clause.

Just as for backup, each archive_device specifies the API (third party) and, for the Sybase API, the physical tape device or disk file name from which you are restoring. For third-party APIs, the content of the archive_device string depends on your vendor. The archive device must not be a raw disk device. When you restore from disk files using the Sybase API, you must supply the same number of archive devices as were specified when this backup was created.

Warning!  If you misspell a tape device name and give a name that is not a valid tape device on your system, RESTORE assumes it is a disk file and tries to read from it.
Note: If you are restoring from tape devices on Windows, note that you do not need to redouble the backslashes when you specify tape devices for restore, as you did for backup.

Example 1 — Restoring to the Same Location

This Windows example restores a database to iquser.db. The database is restored from two disk files. All database files are restored to their original locations.
RESTORE DATABASE 'iquser.db'
FROM 'c:\\iq\\backup1'
FROM 'c:\\iq\\backup2'
Related concepts
Performing Backups with Non-Sybase Products
Recording dbspace Names
Restoring in the Correct Order
Specifying Archive Devices
Verifying a Database Backup