- Installation and Configuration Guide
- Upgrade to STA 2.4.0
- Upgrade STA
- Process and Load the Old STA Database (Task 8)
Process and Load the Old STA Database (Task 8)
Decompress the old database and reinstate it on the STA server. The decompressed database may require 10 to 15 times as much space as the compressed database.
- Stop all STA services on the STA server:
$ STA stop all
- Decompress the backup file. For example:
$ cd /home/oracle $ unzip Jan26_dump.sql.gz
- Purge the STA database of obsolete data, such as processed SNMP records and
empty analytics records.
Note:
A permanent record of
purgerecs
command activity is saved in the STA database. Starting with STA 2.0, database purging also occurs automatically at runtime. Periodically, the MySQL Event Scheduler purges records from various tables to attenuate database growth.- Change to the STA database updates directory.
$ cd /<Oracle_storage_home>/StorageTek_Tape_Analytics/db/updates
- Initiate the purge (for help with
purgerecs
, use$ ./purgerecs -h
).$ ./purgerecs /path_to_dump_file/dump_file_name.sql /path_to_dump_file/dump_file_name_PURGED.sql
In following example,
purgerecs
processes the MySQL dump fileJan26_dump.sql
in/home/oracle
. The output is directed to a new file namedJan26_dump_PURGED.sql
in/home/oracle
.$ cd /Oracle/StorageTek_Tape_Analytics/db/updates $ ./purgerecs /home/oracle/Jan26_dump.sql /home/oracle/Jan26_dump_PURGED.sql
- Change to the STA database updates directory.
- This step is optional. Determine the database file size and estimate the load
process time.
$ ls -s -h dump_file_name_PURGED.sql
- Start the MySQL server:
$ STA start mysql
- Load the old STA database (do not use the -v (verbose) option). Enter the
database root user password when prompted. There is no command output as the
process runs.
$ mysql -uroot -p -e "SET SESSION SQL_LOG_BIN=0; SOURCE /path_to_dump_file/dump_file_name_PURGED.sql;" Password: mysql_root_password
Where:
–p
—Prompts for the database root password established during STA installation.–e
—Execute the following quote-enclosed statements:SET SESSION SQL_LOG_BIN=0;
—Turns off unnecessary binary logging, speeding up the load.SOURCE
/path_to_dump_file
/dump_file_name
_PURGED.sql
—Loads the dump file into the DB.
If the command is successful, you are returned to the command prompt once the process completes.