Wednesday, September 14, 2016

MongoDB/CRITs database move

Moving the database involved the following commands.  Database is called crits
Create a temporary folder using mkdir -p ~/tmp/critsdump
Dump the existing database using mongodump -d crits -o ~/tmp/critsdump
Next to transfer files, I used WinSCP
Transfer the critsdump using WinSCP to the new server
On the NEW machine …
Restore the MongoDB database using mongorestore -d crits tmp/critsdump/crits
After schema upgrade, need to run :  python /data/crits/manage.py upgrade -as



No comments:

Post a Comment