mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
Compare commits
2 commits
a7e65d4095
...
66d57fd451
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66d57fd451 | ||
|
|
86b127378b |
1 changed files with 10 additions and 0 deletions
10
export-collections.bash
Normal file
10
export-collections.bash
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
DB_NAME="evaluetonsavoir"
|
||||
OUTPUT_DIR="/data/db"
|
||||
|
||||
collections=$(mongosh $DB_NAME --quiet --eval "db.getCollectionNames().join(' ')")
|
||||
|
||||
for collection in $collections; do
|
||||
mongoexport --db=$DB_NAME --collection=$collection --out=$OUTPUT_DIR/$collection.json --jsonArray
|
||||
done
|
||||
Loading…
Reference in a new issue