mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Docs: added/revised some notes on backup
This commit is contained in:
parent
e336a320c6
commit
24894e4d65
@ -16,14 +16,14 @@ To back up all the data in a BigchainDB cluster, the RethinkDB admin user must r
|
||||
rethinkdb dump -e bigchain.bigchain -e bigchain.votes
|
||||
```
|
||||
|
||||
That will write a file named `rethinkdb_dump_<date>_<time>.tar.gz`. The `-e` option is used to specify which tables should be exported. You probably don't need to export the backlog table, but you definitely need to export the bigchain and votes tables.
|
||||
That should write a file named `rethinkdb_dump_<date>_<time>.tar.gz`. The `-e` option is used to specify which tables should be exported. You probably don't need to export the backlog table, but you definitely need to export the bigchain and votes tables.
|
||||
`bigchain.votes` means the `votes` table in the RethinkDB database named `bigchain`. It's possible that your database has a different name: [the database name is a BigchainDB configuration setting](../nodes/configuration.html#database-host-database-port-database-name). The default name is `bigchain`. (Tip: you can see the values of all configuration settings using the `bigchaindb show-config` command.)
|
||||
|
||||
There's [more information about the `rethinkdb dump` command in the RethinkDB documentation](https://www.rethinkdb.com/docs/backup/). It also explains how to restore data to a cluster from an archive file.
|
||||
|
||||
What gets backed up? The state of the database when the command was started
|
||||
**Notes**
|
||||
|
||||
**Pros and Cons**
|
||||
* If the `rethinkdb dump` subcommand fails and the last line of the Traceback says "NameError: name 'file' is not defined", then you need to update your RethinkDB Python driver; do a `pip install --upgrade rethinkdb`
|
||||
|
||||
* It can take a very long time to backup data this way. The more data, the longer it will take.
|
||||
|
||||
@ -31,10 +31,7 @@ What gets backed up? The state of the database when the command was started
|
||||
|
||||
* If a document changes after the backup starts but before it ends, then the changed document may not be in the final backup. This shouldn't be a problem for BigchainDB, because blocks and votes can't change anyway.
|
||||
|
||||
|
||||
**Notes**
|
||||
|
||||
* The `rethinkdb dump` subcommand saves database and table contents and metadata, but does not save cluster configuration data.
|
||||
* `rethinkdb dump` saves data and secondary indexes, but does *not* save cluster metadata. You will need to recreate your cluster setup yourself after you run `rethinkdb restore`.
|
||||
|
||||
* RethinkDB also has [subcommands to import/export](https://gist.github.com/coffeemug/5894257) collections of JSON or CSV files. While one could use those for backup/restore, it wouldn't be very practical.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user