diff options
author | varac <varacanero@zeromail.org> | 2013-12-16 15:44:10 +0000 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2013-12-16 15:44:10 +0000 |
commit | 9c203510514cecc8f26da032e9abbbe7a0ea59b1 (patch) | |
tree | 0fcd2b1c3ee5cfbf0d5c02d5e3823d7c1a4cd509 | |
parent | ef6d27099c6d53f03d3e34ecd532483bf1b873f5 (diff) |
encode slash in dbname, include attachments in dump
-rw-r--r-- | couchdb_functions | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/couchdb_functions b/couchdb_functions index 4b47f5d..8330708 100644 --- a/couchdb_functions +++ b/couchdb_functions @@ -69,7 +69,7 @@ dump_db () { # curl_opts='--netrc-file /etc/couchdb/couchdb.netrc' #read -a docs <<< `curl $curl_opts -sS 127.0.0.1:5984/$db/_all_docs | json_pp | sed -ne 's/"id" : "//p' | sed -e 's/",//'` - read -a docs <<< `wget $WGET_OPTS 127.0.0.1:5984/$db/_all_docs | json_pp | sed -ne 's/"id" : "//p' | sed -e 's/",//'` + read -a docs <<< `wget $WGET_OPTS 127.0.0.1:5984/$db/_all_docs | json_pp | sed -ne 's/"id" : "//p' | sed -e 's/",//;s/\//%2F/'` count=${#docs[*]} last=${docs[$(( count - 1 ))]} @@ -80,7 +80,7 @@ dump_db () { for id in "${docs[@]}" do # curl $curl_opts -sS 127.0.0.1:5984/$db/$id - wget $WGET_OPTS 127.0.0.1:5984/$db/$id + wget $WGET_OPTS 127.0.0.1:5984/$db/$id?attachments=true if [[ $id != $last ]] then echo ',' |