# HG changeset patch # User Dirk Olmes # Date 1315928602 -7200 # Node ID 6cbd4420c187ca39146a3dac0f5d5126a5d35bc6 # Parent 0b4c8dc13b7ca7e0a3e3df6daaae2ba48e8c72ba when replicating, also compact the database diff -r 0b4c8dc13b7c -r 6cbd4420c187 replicate.sh --- a/replicate.sh Mon Sep 12 11:07:58 2011 +0200 +++ b/replicate.sh Tue Sep 13 17:43:22 2011 +0200 @@ -1,10 +1,15 @@ -# replicate all documents from the local DB into Xanthippe's and vice versa +# replicate all documents xanthippe's DB into the local DB curl -X POST \ http://localhost:5984/_replicate \ -d '{"source":"http://xanthippe:5984/feedworm", "target":"feedworm"}' \ -H "Content-Type: application/json" +# replicate all documents from the local DB into xanthippe's DB curl -X POST \ http://localhost:5984/_replicate \ -d '{"source":"feedworm","target":"http://xanthippe:5984/feedworm"}' \ -H "Content-Type: application/json" + +# compact the local DB and views +curl -X POST -H "Content-Type: application/json" http://localhost:5984/feedworm/_compact +curl -X POST -H "Content-Type: application/json" http://localhost:5984/feedworm/_compact/feedworm