How can I easily duplicate my production database (mydb
) to create a dev database (mydb-dev
)?
The rethinkdb restore
command seems to have no option to specify the name of the output database. It only has the option to select which database I'd like to restore from the dump. I'm using rethinkdb 1.16.3
RethinkDB backups use the dump command from the RethinkDB command-line utility on your running database cluster to backup your entire deployment. It saves database and table contents as well as metadata.
Once a document is stored in a RethinkDB table, it can be changed using the update() command. This command accepts a JSON document or ReQL expression as input and returns the number of updated documents.
The web interface. Once RethinkDB is running, you can connect to it at http://localhost:8080, assuming you've kept the default port (8080) and it's running on your local machine.
You can use rethinkdb export
, extract the archive, and rename the directory inside before importing it:
$ rethinkdb export
$ cd rethinkdb_export_2015-04-05T13:54:43
$ mv mydb mydb_dev
$ rethinkdb import -d ./
Thinker tool by internalfx also allows you to clone a database to a different DB, using the --targetDB=
option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With