sybrestore

Description

sybrestore allows you to restore an Adaptive Server database to the time of failure from the most current full database backup dump files.

Syntax

sybrestore [-v ] [-h ] 
	[-S server_name | host_name:port_number]
	[-t  restore database to point in time]
	[-D database_name ]
	[-d dump_directory]
	[-I interfaces_file ]
	[-J character_set ]
	[-P password ]
	[-U username]
	[-z language ]

Parameters

-v

prints the version string and exits.

-h

prints the help information and syntax usage and exits.

-S

specifies the name of the source Adaptive Server. sybrestore looks for this name in the interfaces file.

host_name:port_number specifies the machine name and the port number.

-t

restores the specified database to a point in time.

-D

specifies the source database name.

-d

specifies the dump directory for dumping the last log.

-I

identifies a specific interfaces file in which to look for server names. If you do not specify this parameter, sybrestore uses:

  • UNIX $SYBASE/interfaces

  • Windows – %SYBASE%\ini\sql.ini

-J

specifies the character set to be used for the Adaptive Server connection.

-P

specifies your Adaptive Server password. If you do not specify the -P flag, sybrestore prompts for a password.

-U

specifies a case-sensitive login name.

-z

specifies the language to be used for the Adaptive Server connection.

Examples

Example 1

Invokes the command line interactive Restore Database menu. Use single-key entries to navigate through the menu options to specify options for restoring a database:

sybrestore -Usa -P -SlinuxData
<<<<<<<<<====Restore Database Menu ====>>>>>>>>
s : Select Database
t : Target Server
r : Recreate Database
e : Use External Dump
c : Check Geometry
d : Dump Directory
o : Online Database
p : Preview 
g : Go

Example 2

Invokes sybrestore in noninteractive mode using Adaptive Server 15.7 ESD #2 and later. Executes the SQL statements for restoring the database and exits:

sybrestore -Usa -P -SaseServer1 -Ddba_db

Example 3

Invokes the interactive command line Restore Database menu. Executes the SQL statements for restoring the database to a point in time:

 sybrestore -Usa -P -SaseServer1 -t

Usage

Before using sybrestore, verify that:

Permissions

To use sybrestore, you must be logged in with the sa_role, or as the database owner.

See also

Documentation Chapter 10, “Restoring a Database Using sybrestore”.