Command line tools
The package Mercury DB (HgDB) 3.0 contains two command line tools. Every tool has its own article with its function, commands, configuration and examples.
| Tool | Script (bin/) | What it does | How it works |
|---|---|---|---|
mercury-cmd | mercury-cmd.sh | Administrative commands of the server (see Commands of mercury-cmd) | Most commands start their own process next to the server, with access to the database and to the index of the node. The commands index-backup, index-restore and index-backups only call the server through REST |
mercury-transfer | mercury-transfer.sh | Copies the cases of one type (and the definition of the type) from a source instance to a target instance | Connects to two running instances through web services; it needs no access to their databases |
Both tools are written with the library picocli: they have the same style of options (a long name of a command and a short alias, --help, --version), a built-in help in six languages (en, pl, de, es, fr, ko) and the same exit codes (0 success, 1 error of the operation, 2 wrong arguments).
- mercury-cmd: administrative commands of the server.
- Backup and restore of the Lucene index: the commands
index-backup,index-restoreandindex-backupsand what the server does. - mercury-transfer: copying the cases of one type between two instances.
📄️ mercury-cmd
mercury-cmd runs the administrative commands of the server: generating and checking the Lucene index, reindexing, encoding passwords, testing database connections, calibrating the query optimizer and, through REST, the backup and restore of the Lucene index. This article describes how to run it, how to configure it, all its commands and how the backup works.
📄️ Lucene index backup
The commands index-backup, index-restore and index-backups of mercury-cmd order the server to create a backup of the Lucene index of cases, to restore the index from a backup and to list the backups. This article describes the commands and their options, the configuration of the client, and what the server does during a backup and a restore, on one node and in a cluster.
📄️ mercury-transfer
mercury-transfer copies the cases of one type (with the definition of the type) from a source instance to a target instance of Mercury DB (HgDB) 3.0. It connects to two running instances through web services and needs no access to their databases. This article describes how to run it, how it works and how to configure it.