MongoDB: Mongodump terminate called after throwing an instance of ‘std::runtime_error’

Standard

If you encounter this error:

1
2
3
4
5
connected to: 127.0.0.1
Mon Oct 21 10:49:30.638 DATABASE: soft_production to dump/soft_production
terminate called after throwing an instance of 'std::runtime_error'
what(): locale::facet::_S_create_c_locale name not valid
Aborted

Please add this

1
2
3
export LC_ALL=C
# or
export LC_ALL="en_US.UTF-8"

either in the console (for current session) or in .bashrc file.

After that you should be ready to go with:

1
mongodump --db soft_production