Skip to main content

Command line tools

Info

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.

ToolScript (bin/)What it doesHow it works
mercury-cmdmercury-cmd.shAdministrative 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-transfermercury-transfer.shCopies the cases of one type (and the definition of the type) from a source instance to a target instanceConnects 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).