Report this

What is the reason for this report?

How can I move an existing Ruby on Rails application that is hosted elsewhere to Digital Ocean?

Posted on March 20, 2015

It is a pretty straight-forward–yet critical– rails app that has a 50,000 row database (mostly text). What would the steps be beyond setting up a RoR droplet and then copying the files over?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

First, you would want to backup your MySQL database by using this the mysqldump tool: mysqldump -u root -p --all-databases > alldb_backup.sql

Then you would create your new RoR server, copying over your configuration files from your RoR directory using rsync, or another method. Once it’s running, import your MySQL backup:

mysql -u [uname] -p[pass] [db_to_restore] < [backupfile.sql]

Be sure to test to make sure the app is running well, and as expected before you modify DNS data or shut off your old app server.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.