drndump
extracts all schema, records, and index definitions of a dataset in a Droonga cluster.
For example, if there is a Droonga Engine node 192.168.100.50
and you are logged in to a computer 192.168.100.10
in the same network segment, the command line to extract all data in the cluster is:
(on 192.168.100.10)
$ drndump --host 192.168.100.50 --receiver-host 192.168.100.10
{
"type": "table_create",
"dataset": "Default",
"body": {
"name": "Location",
"flags": "TABLE_PAT_KEY",
"key_type": "WGS84GeoPoint"
}
}
{
"type": "table_create",
"dataset": "Default",
"body": {
"name": "Store",
"flags": "TABLE_PAT_KEY",
"key_type": "ShortText"
}
}
...
{
"type": "column_create",
"dataset": "Default",
"body": {
"table": "Term",
"name": "store_name",
"type": "Store",
"flags": "COLUMN_INDEX|WITH_POSITION",
"source": "name"
}
}
The output of this command is valid messages to restore same data to another Droonga cluster. In other words, this command can create a complete backup of a Droonga cluster.
You can save the output as a file by redirection like:
(on 192.168.100.10)
$ drndump --host 192.168.100.50 --receiver-host 192.168.100.10 \
> dump.jsons
You can restore the dataset from a dump output, using droonga-request
command or droonga-send
command.
See also both descriptions.
--host=NAME
--port=PORT
10031
by default.--tag=TAG
droonga
by default.--dataset=NAME
Default
by default.--receiver-host=NAME
--help
This is installed as a part of a rubygems package drndump
.
# gem install drndump