Examples of using sysbck for various databases – HP 3PAR System Reporter Software User Manual

Page 228

Advertising
background image

NOTE:

The sysbck command is recommended when extracting a relatively small sampling of

the database. The command creates a file with SQL statements to insert each row of extracted
data into a database. While this is convenient for subsequently loading the data into a database,
especially if the database is of a different type than the source database, the file size can be quite
large. If you want to extract the entire database or large sections of the database, it is preferable
to dump the entire database as described in

“Dumping the Entire Database” (page 231)

.

On Windows the sysbck.exe executable is installed in the System Reporter directory (by default
C:\Program Files\3PAR\System Reporter

), and on Linux the sysbck.bin executable

is installed in the /usr/bin/ directory.

The parameters for the sysbck command are shown below:

# ./sysbck.binUsage:

sysbck [parameters]

The [parameters] are

-dbtype <dbtype> Type of database: sqlite, mysql or oracle.

-dbhost <dbhost> For mysql: name or IP address of host.

Default is localhost.

For oracle: hosts string.

Ignored if dbtype is sqlite.

-db <name> Name of the database.

For SQLite this is the full file name, including the path,

of the file that contains the database.

-dbpwfile <file> Name of file whose first line is the username and

password for the database.

Ignored if dbtype is sqlite.

-dbouttype [Optional] <dbtype> Name of the outscript db type

-scripttype [Optional] <script type> Type of the script 'insert/create/both'

-backupfilename The file name along with the path to put the extract in

-begintime [Optional] begin time of the extract in '%m/%d/%YYYY %H:%M:%S' format

-endtime [Optional] end time of the extract in '%m/%d/%YYYY %H:%M:%S' format

-inservname [Optional] name of the inservs to be extracted seperated by ':'

NOTE:

The -inservname parameter specifies the IP Name or Address that was assigned while

configuring the HP 3PAR StoreServ Storage systems. If you are not sure, go to Policy Settings

→InServ Systems to get this parameter.

NOTE:

The -dbouttype parameter should not be used when extracting data for analysis by

HP support.

Depending on the -scripttype parameter, the sysbck command produces one or both of the
following types of files:
1.

The <backup>.str file contains SQL code to create the database structure (tables and
indexes).

2.

The <backup>.ins contains SQL code to insert the data into the tables.

These files can be source as SQL commands to create the schema and insert the data
respectively.

To limit the extracted data to one or more systems, use the -inservname parameter. To limit
the extracted data to a particular time period, use the -begintime and -endtime
parameters.

Examples of Using sysbck for Various Databases

Following are examples of how to use the sysbck command to generate output for various
databases.

228 Troubleshooting System Reporter

Advertising