Sybase 12.4.2 User Manual

Page 420

Advertising
background image

Restoring your databases

400

Just as for backup, each archive_device specifies the API (Sybase or 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.

See “Specifying archive devices” for details on specifying devices.

Note

If you are restoring from tape devices on Windows NT, 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 NT example restores a database to asiquser.db. The database is
restored from two disk files. All database files will be restored to their original
locations.

RESTORE DATABASE ’asiquser.db’

FROM ’c:\\asiq\\backup1’

FROM ’c:\\asiq\\backup2’

Moving database files

If you need to move database files to a new location—for example, if one of
your disk drives fails—you use one of the following methods:

To move the database file that holds the Catalog Store (by default, the .db
file), you simply specify the new name as db_file.

To move or rename the transaction log file, you use the Transaction Log
utility (

DBLOG

). For syntax and details, see “The DBLOG command-line

utility” on page 405.

Advertising