Name: couchbase-dump
Owner: Kik Interactive
Description: Helpful scripts for dumping and recreating couchbase buckets and views
Created: 2016-04-03 14:03:31.0
Updated: 2017-02-27 06:53:58.0
Pushed: 2016-11-22 12:03:06.0
Homepage: null
Size: 9
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Helpful scripts for dumping and recreating couchbase buckets and views
Dump all your couchbase buckets and views as javascript files in a directory hierarchy that you can commit to your repo. Then you can recreate the couchbase buckets and views from previously dumped data.
The scripts use standard python libraries and have no dependencies.
Dump your production couchbase like so:
_couchbase.py Administrator Password couchbase.example.com:8091 couchbase_buckets
Then create the couchbase buckets on a new couchbase instance
te_couchbase.py Administrator Password couchbase.example.com:8091 couchbase.example.com:8092 couchbase_buckets
Given is an example docker-compose.yml
and init_couchbase_image.sh
script for creating a new couchbase instance.
The script waits for the couchbase instance to load, as it may take a while, and then initializes it to a default username and password and runs create_couchbase.py
.
if you have just ran dump_couchbase.py as describe above, run the following to create your couchbase image:
docker-compose run init-couchbase
remove the couchbase and data created by docker-compose
docker-compose stop; docker-compose rm -f
its usually a lot simply to write the views using couchbase UI - and then dump it into a file with the dumpscript. This is especially true when your view uses the built-in reduce function.
pip