Using FioranoMQ DB Recovery Tool
The DB Recovery Tool is executed by running recover-database.bat/ recover-database.sh which can be found under %FIORANO_HOME%\fmq\bin.
Using Windows
> recover-database.bat [–propertiesFile <absolute path for configuration file>]
[-fmq.profile <profile name for which DB is to be recovered>]
[-h ]
Using Unix/Linux
$ ./recover-database.sh [–propertiesFile <absolute path for configuration file>]
[-profile <profile name for which DB is to be recovered>]
[-h ]
Parameters
Properties file: Configuration file. Default configuration file is located at %FIORANO_HOME%\fmq\profiles\recovery.properties
Example
> recover-database.bat –propertiesFile c:\db.properties
Profile: Profile name for which DB is corrupted and to be recovered.
> recover-database.bat –profile FioranoMQ_XA
Help: Brief information on various command line arguments.
> recover-database.bat -h
DB Path: Path in which FMQ DB is located.
> recover-database.bat -dbPath %FIORANO_HOME%\fmq\profiles\FioranoMQ_XA\run
checkCSP: Analyzes CSP cache specified in path
> recover-database.bat -checkCSP %CSP_CACHE_PATH%
Operation: The operation to be performed by the recovery tool. By default, the value is RunExtractor.
> recover-database.bat RunExtractor
GetAclNames: Used with the recovery script to display all ACLs.
> recover-database.bat GetAclNames
GetAllTopics: Lists all available topics using the recovery script.
> recover-database.bat GetAllTopics
GetMessagesForQueue: Retrieves messages for a specific queue. Requires setting the Java system property QUEUE_NAME in recovery-database.conf.
> recover-database.bat GetMessagesForQueue
GetMessagesForAllQueues: Lists messages from all available queues using the recovery script.
> recover-database.bat GetMessagesForAllQueues
GetMessagesForTopic: Retrieves messages for a specific topic.Requires setting the Java system property TOPIC_NAME in recovery-database.conf.
> recover-database.bat GetMessagesForTopic
GetMessagesForAllTopics - Lists messages from all available topics using the recovery script. Useful for viewing complete topic-wise message data.
> recover-database.bat GetMessagesForAllTopics
Configuration File Parameters
- RUN_PTP_ANALYZER: Analyzes whether or not to recover the PTP subsystem database. The default is true.
- RUN_PUBSUB_ANALYZER: Analyzes whether or not to recover PUBSUB subsystem database. The default is false
- RUN_SDB_ANALYZER: Analyzes whether or not to recover Security subsystem database. The default is false.
- TRACE_LEVEL: Trace level for DB recovery tool. The default number is 6 (which is the maximum).
- PTP_DB_NAME: This is the database name for the PTP Subsystem. The default value is PTP. This default value can be configured from Profile Manager by setting the value of Fiorano.mq.ptp.databases.file.FileDBManager.Path
- PUBSUB_DB_NAME: This is the database name for the PUBSUB SubSystem. The default value is PUBSUB. This default value can be configured from Profile Manager by setting the value of Fiorano.mq.pubsub.databases.file.FileDBManager.Path
- SDB_ACL_DB_NAME: This is the database name for SDB ACL Manager. The default value is SDB/REALM.ACL. This default value can be configured from Profile Manager by setting the value of Fiorano.security.AclManager.FileDBManager.Path
- SDB_PRINCIPAL_DB_NAME: This is the database name for SDB Principal Manager. The default value is SDB/REALM.PRINCIPAL. This default value can be configured from Profile Manager by setting the value of Fiorano.security.PrincipalManager.FileDBManager.Path
- RENAME_DIRECTORY ANALYZER: Analyzes whether or not to rename the recovered directory to the default name. The default is false.
- Default names for PTP, PUBSUB and Security subsystem database are PTP, PUBSUB and SDB respectively.
- When 'tool' recovers some of the database it creates a new directory by adding prefix .New to the default name, that is, PTP.New.
- If RENAME_DIRECTORY is true, it renames the old (may be corrupted) database with prefix .Old, that is, PTP.Old, and renames the recovered database to the default state by removing prefix .New.