changeset 186:6cbd4420c187

when replicating, also compact the database
author Dirk Olmes <dirk@xanthippe.ping.de>
date Tue, 13 Sep 2011 17:43:22 +0200
parents 0b4c8dc13b7c
children 2f2016a10f7d
files replicate.sh
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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