дока
http://docs.couchbase.com/admin/admin/REST/rest-ddocs-get.html
Небольшой бонус: синхронизатор вьюх
HOST=''
HOST_TO=''
AUTH='-u Administrator:pass'
BUCKET=''
for i in `curl ${AUTH} -s http://${HOST}:8091/pools/default/buckets/$BUCKET/ddocs |sed -e 's#/#\n#g' |egrep "^_design"|sort|uniq| awk -F '%2F' '{print $2}'` ; do
curl $AUTH -s "http://${HOST}:8092/$BUCKET/_design/$i" > $i.ddoc
curl $AUTH -s -X PUT -d @${i}.ddoc -H 'Content-Type: application/json' "http://${HOST_TO}:8092/$BUCKET/_design/$i"
done
Комментариев нет:
Отправить комментарий