From 433cd7a52e0b73f30abdde7cbf7ba18a70eb302f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Wed, 16 Jan 2019 01:13:42 +0100 Subject: [PATCH] Export all relevant collection to a shared folder --- db-migration-worker/import.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/db-migration-worker/import.sh b/db-migration-worker/import.sh index 02fae0f7e..2ff3d6443 100755 --- a/db-migration-worker/import.sh +++ b/db-migration-worker/import.sh @@ -23,7 +23,7 @@ mongodump --host localhost -d ${MONGODB_DATABASE} --port 27018 --username ${MONG ssh -S my-ctrl-socket -O check -l ${SSH_USERNAME} ${SSH_HOST} ssh -S my-ctrl-socket -O exit -l ${SSH_USERNAME} ${SSH_HOST} -# cat ./neo4j_import.cql | /usr/share/neo4j/bin/cypher-shell - - - +for collection in "categories" "badges" "users" "contributions" "comments" "follows" "shouts" +do + mongoexport --db ${MONGODB_DATABASE} --collection $collection --out "/mongo-export/$collection.json" +done