Comments (9)
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.
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.
I created a nodejs small cli app to get a full databases list calling the script for every list item.
from couchdb-dump.
@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.
Just curl couchdb, parse it with jq, and pass the list into a for loop? :)
from couchdb-dump.
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.
Shouldn't that line be
for db in "${dbname[@]}"; do \
from couchdb-dump.
Shouldn't that line be
for db in "${dbname[@]}"; do \
Yes, it was a typo, updated. Thanks for pointing it out.
from couchdb-dump.
Thanks for sharing the snippet
from couchdb-dump.
Related Issues (20)
- Backup / restore all databases? HOT 4
- Stuck at 'Stage 1 - Document filtering' HOT 6
- Taking backup for all revisions HOT 1
- Is it possible to set the password with a environment variable? HOT 4
- ERROR: Curl encountered an issue whilst dumping the database HOT 1
- Backup exits with exitcode 1 in silent mode HOT 1
- can dump all revisions docs HOT 4
- Error when restoring: POST body must include `docs` parameter. HOT 4
- Document update conflict upon restore HOT 3
- couchdb-dump doesn't work with busybox's grep anymore HOT 1
- Invalid UTF-8 JSON error while restoring large file HOT 5
- Restore backup into non-empty database HOT 1
- Backup does not work with pouchdb-server
- Question: How does the restore handle duplicate data? HOT 1
- compilation_error when attempting to restore database
- CouchDB Reported error, need some advice on how to debug HOT 1
- How can exclude some databases from backup? HOT 1
- Nice to have a 'drop database' option
- Intermittent backup issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from couchdb-dump.