Skip to content

Instantly share code, notes, and snippets.

@kevincolten
Last active November 1, 2016 04:22
Show Gist options
  • Save kevincolten/0374702276f4bbe6e08304a72a4bcb79 to your computer and use it in GitHub Desktop.
Save kevincolten/0374702276f4bbe6e08304a72a4bcb79 to your computer and use it in GitHub Desktop.
Rocket.Chat DB Migration from Heroku/mLab to DigitalOcean

Rocket.Chat DB Migration from Heroku/mLab to DigitalOcean

  1. Put app in maintenance mode on Heroku
  2. Download backup of database in mLab
  3. Copy database to DO Droplet scp backup.tgz [email protected]:~/
  4. SSH into droplet and unzip the file tar zxvf backup.tgz
  5. Inside the unzipped directory, rename the database directory to parties/ mv backup/database-name/ backup/parties
  6. Delete the index file rm backup/parties/system.indexes.bson
  7. Delete the current mongo database mongo parties --eval "db.dropDatabase()"
  8. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment