Question

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

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?


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.