Code Monkey home page Code Monkey logo

Comments (9)

backspace avatar backspace commented on June 25, 2024 1

Also thanks, I adapted it to extract all the databases into a directory:

for i in $(curl -X GET http://127.0.0.1:5984/_all_dbs); do \
         i=${i//[/}; i=${i//]/}; i=${i//\"/}
         IFS=, read -ra dbname <<< "$i"
done

for db in "${dbname[@]}"; do \
    echo $db;
    ./couchdb-dump.sh -b -H 127.0.0.1 -d ${db} -f dbs/${db}.json
done

from couchdb-dump.

PulkitSolulab avatar PulkitSolulab commented on June 25, 2024

Hello,
there is an option to backup/restore all databases?
Thank you!

Did you find anything till now. How to take all Databases at once

from couchdb-dump.

skycult avatar skycult commented on June 25, 2024

I created a nodejs small cli app to get a full databases list calling the script for every list item.

from couchdb-dump.

greenais avatar greenais commented on June 25, 2024

@skycult could you please share your app?
I have plenty of DBs to backup so not inventing wheel once again would be quite time-saving)

from couchdb-dump.

dalgibbard avatar dalgibbard commented on June 25, 2024

Just curl couchdb, parse it with jq, and pass the list into a for loop? :)

from couchdb-dump.

abheyogy avatar abheyogy commented on June 25, 2024

Its a simple curl, please find the snippet in BASH below:

for i in $(curl -X GET http://127.0.0.1:5984/_all_dbs); do \
         i=${i//[/}; i=${i//]/}; i=${i//\"/}
         IFS=, read -ra dbname <<< "$i"
done

for db in "${dbname[@]}"; do \
    echo $db;
done

from couchdb-dump.

schwichti avatar schwichti commented on June 25, 2024

Shouldn't that line be

for db in "${dbname[@]}"; do \

from couchdb-dump.

abheyogy avatar abheyogy commented on June 25, 2024

Shouldn't that line be

for db in "${dbname[@]}"; do \

Yes, it was a typo, updated. Thanks for pointing it out.

from couchdb-dump.

schwichti avatar schwichti commented on June 25, 2024

Thanks for sharing the snippet

from couchdb-dump.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.