I need to rename a database I created using pymongo
. I'd like to use pymongo
to do it. I found this other stackoverflow question that is very similar, and the code snippets look pythonesque, except the use
keyword which makes it... I don't know what (Update: Perl probably?).
I did a
client.copy_database('old_name', 'new_name)
And found that I then had new_name
in `client.database_names()'. But it appears to have no collections in it? What else do I need to do, to deeply copy the database, using pymongo commands?