HarperDB CLI
To install HarperDB with CLI prompts, run the following command:
harperdb install
Alternatively, HarperDB installations can be automated with environment variables or command line arguments; see a full list of configuration parameters here. Note, when used in conjunction, command line arguments will override environment variables.
#minimum required parameters for no additional CLI prompts
export TC_AGREEMENT=yes
export HDB_ADMIN_USERNAME=HDB_ADMIN
export HDB_ADMIN_PASSWORD=password
export ROOTPATH=/tmp/hdb/
export OPERATIONSAPI_NETWORK_PORT=9925
harperdb install
#minimum required parameters for no additional CLI prompts
harperdb install --TC_AGREEMENT yes --HDB_ADMIN_USERNAME HDB_ADMIN --HDB_ADMIN_PASSWORD password --ROOTPATH /tmp/hdb/ --OPERATIONSAPI_NETWORK_PORT 9925
To start HarperDB after it is installed, run the following command:
harperdb start
To stop HarperDB once it is running, run the following command:
harperdb stop
To restart HarperDB once it is running, run the following command:
harperdb restart
The following commands are used to start, restart, or stop one or more HarperDB service without restarting the full application:
harperdb start --service harperdb,"custom functions",ipc
harperdb stop --service harperdb
harperdb restart --service "custom functions"
The following services are managed via the above commands:
- HarperDB
- Custom Functions
- IPC
- Clustering
To check the version of HarperDB that is installed run the following command:
harperdb version
HarperDB uses a transactional commit process that ensures that data on disk is always transactionally consistent with storage. This means that HarperDB maintains safety of database integrity in the event of a crash. It also means that you can use any standard volume snapshot tool to make a backup of a HarperDB database. Database files are stored in the hdb/schemas directory (organized schema directories). As long as the snapshot is an atomic snapshot of these database files, the data can be copied/movied back into the schemas directory to restore a previous backup (with HarperDB shut down) , and database integrity will be preserved. Note that simply copying an in-use database file (using
cp
, for example) is not a snapshot, and this would progressively read data from the database at different points in time, which yields unreliable copy that likely will not be usable. Standard copying is only reliable for a database file that is not in use.Last modified 1mo ago