# Migration of RoR applications to a new server

**URL:** <https://www.ruby-forum.com/t/migration-of-ror-applications-to-a-new-server/145675>\
**Category:** Rails\
**Created:** [August 12, 2008, 8:20pm UTC](https://www.ruby-forum.com/t/migration-of-ror-applications-to-a-new-server/145675 "2008-08-12T20:20:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vtypal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/3be4f8/32.png) [@vtypal](https://www.ruby-forum.com/u/vtypal)\
**Post date:** [August 12, 2008, 8:20pm UTC](https://www.ruby-forum.com/t/migration-of-ror-applications-to-a-new-server/145675/1 "2008-08-12T20:20:11Z")

</div>

I have to move my RoR apps to a new server. It may sound extremely  
simple, but i’d like to hear some advices before proceeding: How should  
i make this migration? For the migration of the mysql databases, should  
i follow the MySQL documentation? For the rails directories, simply FTP?

Thanks in advance,  
Vaggelis

---

<div class="post-metadata">

**Author:** ![vtypal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/3be4f8/32.png) [@vtypal](https://www.ruby-forum.com/u/vtypal)\
**Post date:** [August 19, 2008, 12:54pm UTC](https://www.ruby-forum.com/t/migration-of-ror-applications-to-a-new-server/145675/2 "2008-08-19T12:54:13Z")

</div>

I did simply a secure copy from the old server to the new one:

$ scp -pr MyRailsWorkDirectory username@hostname-or-ip:directory/

where “MyRailsWorkDirectory” is my rails work dir from the old server,  
“user” is a username created to the new server, and “directory/” is the  
directory where the MyRailsWorkDirectory will be moved on. The initial  
location is the home directory of the “username”. Note that “:” is not a  
port symbol.

In order to migrate all my mysql databases i first did a backup:

$ mysqldump -u root -p --all-databases \> backup.sql  
(\*\*\* there is no need to stop the databases during backup. MysqlDump  
blocks all databases during backup process \*\*\*)

and after trasfering backup.sql (i used again scp to do this) to the new  
server i restored all with:

$ mysql -u root -p \< backup.sql

The migration was completely successful acting in this way.

Vaggelis Typaldos wrote:

> I have to move my RoR apps to a new server. It may sound extremely  
> simple, but i’d like to hear some advices before proceeding: How should  
> i make this migration? For the migration of the mysql databases, should  
> i follow the MySQL documentation? For the rails directories, simply FTP?
> 
> Thanks in advance,  
> Vaggelis
