Decrease split size

This might take longer but will require less memory. I guess this might
work even on our kubernetes cluster.
This commit is contained in:
Robert Schäfer 2019-05-31 18:35:58 +02:00
parent 019fd04d44
commit 115022fc2e

View File

@ -10,7 +10,7 @@ set +o allexport
function export_collection () {
"${EXPORT_MONGOEXPORT_BIN}" --db ${MONGODB_DATABASE} --host localhost -d ${MONGODB_DATABASE} --port 27018 --username ${MONGODB_USERNAME} --password ${MONGODB_PASSWORD} --authenticationDatabase ${MONGODB_AUTH_DB} --collection $1 --collection $1 --out "${EXPORT_PATH}$1.json"
mkdir -p ${EXPORT_PATH}splits/$1/
split -l 1000 -a 3 ${EXPORT_PATH}$1.json ${EXPORT_PATH}splits/$1/
split -l 100 -a 3 ${EXPORT_PATH}$1.json ${EXPORT_PATH}splits/$1/
}
# Delete old export & ensure directory