# Deploying the data

**URL:** <https://www.ruby-forum.com/t/deploying-the-data/111602>\
**Category:** Deployment\
**Created:** [August 9, 2007, 1:12am UTC](https://www.ruby-forum.com/t/deploying-the-data/111602 "2007-08-09T01:12:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 9, 2007, 1:12am UTC](https://www.ruby-forum.com/t/deploying-the-data/111602/1 "2007-08-09T01:12:38Z")

</div>

I think I have a fundamental misunderstanding of the deployment  
process that I’m hoping someone can clear up for me.

I’ve been developing a rails app on my local machine in the  
development environment. All data is writing to railsapp\_development.

Over the last couple of days I’ve been trying to deploy the app to a  
production environment on a remote server. I did this with deprec.  
It worked, but only the database schema went with it. The actual data  
did not move. I believe that this is normal. If so, how do you get  
your data to deploy?

write a capistrano task?  
export it off the local machine, and import it to a database on the  
remote server manually?

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 9, 2007, 1:19am UTC](https://www.ruby-forum.com/t/deploying-the-data/111602/2 "2007-08-09T01:19:38Z")

</div>

Generally, the data in the development database is not “real”. It’s  
just play data that you use while you develop the product. Once your  
product is minimally usable (and well before actual “launch”) you  
start deploying your application to the production environment, which  
is where you actually starting using it with real data.

It sounds like you’ve been using your dev database for real data. This  
isn’t a bad thing, it’s just different from the assumptions that  
Capistrano makes. As a result, you’ll need to move the development  
data to your production database. There’s not a lot of reason to write  
a task to do this, since it will probably be something you just do  
once. Just do a dump of your database to a file, copy that file (via  
scp or sftp or whatever) to your production server, and then import it  
into your production database. How you actually export and import data  
is largely database dependent. Each database has it’s own utility for  
dumping data.

- Jamis

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 9, 2007, 1:36am UTC](https://www.ruby-forum.com/t/deploying-the-data/111602/3 "2007-08-09T01:36:39Z")

</div>

Great. Thanks for clearing that up.

So, as I continue to develop this app, and I pull down a version from  
the repository to work on, I should not be adding records unless I  
want to move the data again? In other words, records should only be  
added to the app running on the production server?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 9, 2007, 1:42am UTC](https://www.ruby-forum.com/t/deploying-the-data/111602/4 "2007-08-09T01:42:40Z")

</div>

Furfey, that’s pretty much spot on. Sometimes I would write a  
migration to add a couple of default records to ensure they are added  
to multiple environments databases.

There are a couple of capistrano recipes floating about on this user  
group for syncing database down from production back to your local  
development copy, which as it sounds should help you a good bit.

Best,  
Dave
