- Put app in maintenance mode on Heroku
- Download backup of database in mLab
- Copy database to DO Droplet
scp backup.tgz [email protected]:~/ - SSH into droplet and unzip the file
tar zxvf backup.tgz - Inside the unzipped directory, rename the database directory to
parties/mv backup/database-name/ backup/parties - Delete the index file
rm backup/parties/system.indexes.bson - Delete the current mongo database
mongo parties --eval "db.dropDatabase()" - Restore the new database
mongorestore backup/
To restart your the Droplet, you can run /sbin/shutdown -r now.
To shutdown the droplet, sudo shutdown -h now