mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
10 lines
286 B
Bash
10 lines
286 B
Bash
#!/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
|