How to rename a mongodb collection
![How to rename a mongodb collection](https://res.cloudinary.com/audiodog/image/upload/w_640,h_155,c_scale,f_auto,q_auto/v1513806711/images/site/blog_banner_light.png)
On installing a sample node.js application the associated mongo files ended up with long collection names including '.' and digit blocks.
To rename you cannot access the collection directly, as the dot-digit combination is illegal. Instead use
db.getCollection('mongodump.20130805.Customer').renameCollection('Customer');
to solve the problem.