Skip to content

Instantly share code, notes, and snippets.

@irvingpop
Created July 30, 2014 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save irvingpop/8b071dff7951226edf96 to your computer and use it in GitHub Desktop.
Save irvingpop/8b071dff7951226edf96 to your computer and use it in GitHub Desktop.
couchdb backup & restore
  1. Download the database:
curl http://localhost:5984/mydb/_all_docs?include_docs=true > mydb.json
  1. Change the first line from:
    {"total_rows":1121,"offset":0,"rows":[
    *TO*
    {"docs":[
  1. create the database on your local couch
    curl -X PUT http://127.0.0.1:5984/targetdb
  1. Upload the database:
    curl -d @bulkload.json -H "Content-Type: application/json" -X POST http://localhost:5984/targetdb/_bulk_docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment