From 5b674cd95fe8cb299b010b8783243186abc8e8dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Mon, 4 Feb 2019 21:33:48 +0100 Subject: [PATCH] Hopefully fix `migrate` on Digital Ocean It kept crashing, maybe because we're piping too much stuff to STDOUT. Let's see. --- db-migration-worker/migration/mongo/import.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db-migration-worker/migration/mongo/import.sh b/db-migration-worker/migration/mongo/import.sh index 4f59551aa..fb13a151f 100755 --- a/db-migration-worker/migration/mongo/import.sh +++ b/db-migration-worker/migration/mongo/import.sh @@ -21,7 +21,8 @@ mongo ${MONGODB_DATABASE} --eval "db.dropDatabase();" rm -rf /mongo-export/* ssh -4 -M -S my-ctrl-socket -fnNT -L 27018:localhost:27017 -l ${SSH_USERNAME} ${SSH_HOST} -mongodump --host localhost -d ${MONGODB_DATABASE} --port 27018 --username ${MONGODB_USERNAME} --password ${MONGODB_PASSWORD} --authenticationDatabase ${MONGODB_AUTH_DB} --gzip --archive | mongorestore --gzip --archive +mongodump --host localhost -d ${MONGODB_DATABASE} --port 27018 --username ${MONGODB_USERNAME} --password ${MONGODB_PASSWORD} --authenticationDatabase ${MONGODB_AUTH_DB} --gzip --archive=/tmp/mongodump.archive +mongorestore --gzip --archive=/tmp/mongodump.archive ssh -S my-ctrl-socket -O check -l ${SSH_USERNAME} ${SSH_HOST} ssh -S my-ctrl-socket -O exit -l ${SSH_USERNAME} ${SSH_HOST}