diff --git a/db-migration-worker/import.sh b/db-migration-worker/import.sh index 0251a3582..8e949a123 100755 --- a/db-migration-worker/import.sh +++ b/db-migration-worker/import.sh @@ -18,7 +18,7 @@ echo "UPLOADS_DIRECTORY ${UPLOADS_DIRECTORY}" echo "-------------------------------------------------" mongo ${MONGODB_DATABASE} --eval "db.dropDatabase();" -rm -f /mongo-export/* +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