Dumping the entire database, Dumping the entire sqlite database – HP 3PAR System Reporter Software User Manual

Page 231

Advertising
background image

Issuing sysbck without a begin and end date (this will extract for all data for system s138):

sysbck -dbtype oracle -dbhost istat -db cliuser -dbpwfile dbpwfile -backupfilename

"c:/test/test_20100713_1322PM" -dbouttype mysql -inservname s138 -scripttype

both

Issuing sysbck without a begin and end date and dbouttype (Note this will extract for all
data for system s138; in this instance the extract will default to the MySQL extraction:

sysbck -dbtype oracle -dbhost istat -db cliuser -dbpwfile dbpwfile -backupfilename

"c:/test/test_20100713_1322PM" -inservname s138 -scripttype both

NOTE:

When executing sysbck.exe from any other directory on Windows, ensure that the

PATH environment variable is set to the System Reporter root directory path (by default, this path
is C:\Program Files\3par).

Dumping the Entire Database

When you want to extract a large part of the database, it may be more efficient, both in time and
disk space, to dump the entire database instead of using sysbck. The method for dumping the
entire database depends on the database type. The process for SQLite is described in

“Dumping

the Entire SQLite Database” (page 231)

while the process for MySQL is described in

“Dumping the

Entire MySQL Database” (page 232)

. For Oracle and MS SQL, please refer to the Oracle or Microsoft

documentation.

Dumping the Entire SQLite Database

The SQLite database is just a file (by default C:\Program Files\3par\System Reporter\
inservstats\inservstats.db

on Windows and /var/inservstats/inservstats on

Linux). However, if there are other files in the same directory created by SQLite, such as a journal
file (inservstats.db-journal) you cannot just copy the database file to another location and
open it as an SQLite database. The presence of the other files, such as the journal file, indicates
that the database is not in a consistent state. The recommended way to get a copy is to follow
these steps:
1.

Stop the HP 3PAR System Reporter sampler service (Windows) or daemon (Linux) so that the
database is not active while you are making the copy.

2.

If there is no other file (such as the journal file), the database is now consistent and you can
just copy the inservstats.db file.

3.

If there is another file (such as the journal file), the database is still inconsistent. In this case,
you must first open the database with SQLite which will automatically apply the journal
changes. The easiest way to do this is to generate a report from the database using a web
browser. The web server will open the database, the journal changes will be automatically
applied, and the journal file will be automatically deleted. Then you can copy the database
file.

4.

After the database file has been copied, you can restart the HP 3PAR System Reporter sampler
service (Windows) or daemon (Linux).

NOTE:

Ideally, when extracting data for HP support from an SQLite database, use sysbck

without the default dbouttype parameter.

Dumping the Entire Database

231

Advertising