xxxxxxxxxx
db.MaheshCollection.renameCollection("Collections")
Where
MaheshCollection is source collection to be renamed
Collections is the new name of collection
xxxxxxxxxx
# renaming rrecord collection to record
db.rrecord.renameCollection("record")