mongodb rename database
db.copyDatabase("db_to_rename","db_renamed","localhost")
use db_to_rename
db.dropDatabase();
# Dump db to a local folder
mongodump mongodb://user:pwd@localhost/old_name -o ./dump
# Restore the db with the new name
mongorestore mongodb://user:pwd@localhost -d new_name ./dump/old_name
# Then run these commands in your mongodb shell
use old_name
db.dropDatabase()
Also in C++:
- clean local branches git
- git get all branches and code
- install react form
- install mongodb on manjaro linux
- sed delete line with match
- how to kill running process in linux
- how to check node is installed or not
- how to create a guid in powershell
- brew install wine
- ubuntu mate 20.04 videodev module not working
- how to make jobs run synchronously on github actions
- set nemo as default ubuntu
- git clone permission denied (publickey)
- jekyll new site
- vim shuffle lines of file
- linux failed to save insufficient permissions vscode
- how to compress pdf in linux
- sed replace number
- configure: error: *** POSIX caps headers not found
- uninstall R
- openssh client for windows 10
- check arp cache linux
- install docker on manjaro linux
- git checkout -b doesn't show updated code