Last active
February 16, 2018 18:58
-
-
Save adyshimony/bff77675db39522bd3d30915f9581161 to your computer and use it in GitHub Desktop.
couchdb commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// management tool, see all docs | |
http://127.0.0.1:5984/_utils/#/_all_dbs | |
// DB compact where supernode is db name (minor improvement, can ignore) | |
curl -H "Content-Type: application/json" -X POST http://admin:123456@localhost:5984/supernodedb/_compact | |
// get info on specific view | |
http://127.0.0.1:5984/_utils/#/database/supernodedb/_design/toDoc/_info | |
// compact views - run one by one and not together. check progress with http://127.0.0.1:5984/_utils/#/activetasks | |
curl -H "Content-Type: application/json" -X POST http://admin:123456@localhost:5984/supernodedb/_compact/toDoc | |
curl -H "Content-Type: application/json" -X POST http://admin:123456@localhost:5984/supernodedb/_compact/fromDoc | |
curl -H "Content-Type: application/json" -X POST http://admin:123456@localhost:5984/supernodedb/_compact/blockDoc | |
curl -H "Content-Type: application/json" -X POST http://admin:123456@localhost:5984/supernodedb/_compact/contract | |
// check disk space couch db use | |
sudo du -cha --max-depth=1 /var/lib | grep -E "M|G" | |
// delete a view (you need to set the revision, take that from managment http://127.0.0.1:5984/_utils/#/_all_dbs) | |
curl -H "Content-Type: application/json" -X DELETE http://admin:123456@localhost:5984/supernodedb/_design/VIEWNAME?rev=2-ac58d589b37d01c00f45a4418c5a15a8 | |
// view clean up - after view delete, this cleans the disk space | |
curl -H "Content-Type: application/json" -X POST http://admin:123456@localhost:5984/supernodedb/_view_cleanup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment