docker-compose exec -T <mongodb_service_name> mongodump --archive --gzip --db <mongodb_database> > dump.gz
docker-compose exec -T mongorestore --archive --gzip < dump.gz
function getNumberToLeftSide(numberToLeft) { | |
let numbr = '' | |
let i = 1; | |
while (!isNaN(numberToLeft[numberToLeft.length - i])) { | |
numbr = numberToLeft[numberToLeft.length - i] + numbr | |
i++; | |
} | |
return numbr | |
} | |