Reputation: 9013
I'm relatively new to Couchbase (and nosql) so maybe I'm missing something obvious but what I'd like to be able to do is automate building a new environment as much as possible.
With MySql I can relatively easily create .sql
files and use them to both create the table structures as well as do the appropriate inserts to add all base reference data that I want loaded into a new environment. What's the best way to do something similar in Couchbase? Are there any tools (open source or otherwise) that might help with this?
My initial thought was to use the client API to "get" all the bucket data into .JSON files and then on the other end use another script to "put" it back into the bucket. Not sure this is the most elegant way of moving the data but it also does nothing about the moving the "schema". Yes I know schema might be seen as a dirty word in nosql but what I mean is ideally I'd like to use reflection on the source environment and identify all the buckets and views and then be able to recreate these on the targe environment.
Upvotes: 2
Views: 1367
Reputation: 3510
So in addition to the cbbackup and cbtransfer ( http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-admin-cmdline-cbtransfer.html ) tools you can also depending of the volume use the XDCR (Cross Data Center Replication) in a single direction (from your production to development environment).
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-admin-tasks-xdcr.html
Upvotes: 1
Reputation: 309
You can use the inbuilt Couchbase 'cbbackup' and 'cbrestore' commands through the CLI.
They will copy Data, and views etc. to a specified env.
The docs can be found here:
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-admin-cmdline-cbbackup.html
I hope this helps!
Robin J.
Upvotes: 3