Skip to content

Instantly share code, notes, and snippets.

@cristopher-rodrigues
Created March 10, 2016 12:43
Show Gist options
  • Save cristopher-rodrigues/b25b2945e0da61bcc7b8 to your computer and use it in GitHub Desktop.
Save cristopher-rodrigues/b25b2945e0da61bcc7b8 to your computer and use it in GitHub Desktop.
mongo rename db
db.copyDatabase("oldDb","newDb","connection")
use oldDb
db.dropDatabase();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment