# DB export, then import

**URL:** <https://www.ruby-forum.com/t/db-export-then-import/152085>\
**Category:** Deployment\
**Created:** [October 30, 2008, 12:55am UTC](https://www.ruby-forum.com/t/db-export-then-import/152085 "2008-10-30T00:55:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![thithi32](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b782af/32.png) [@thithi32](https://www.ruby-forum.com/u/thithi32)\
**Post date:** [October 30, 2008, 12:55am UTC](https://www.ruby-forum.com/t/db-export-then-import/152085/1 "2008-10-30T00:55:48Z")

</div>

Hi,

I’m developping a little application on my computer (Windows Vista). It  
works.  
I did put it on my Unix server (production) and started the ruby server.  
It works fine.  
But of course there’s no data :).

How can I export the data from my developpement DB (local Windows) to my  
production DB (distant Unix)?

Thank you!

Thierry

---

<div class="post-metadata">

**Author:** ![thithi32](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b782af/32.png) [@thithi32](https://www.ruby-forum.com/u/thithi32)\
**Post date:** [October 30, 2008, 4:29am UTC](https://www.ruby-forum.com/t/db-export-then-import/152085/2 "2008-10-30T04:29:11Z")

</div>

Thierry,

You’ll want to refer to your databases documentation for creating a  
dump and importing it.

Robby

On Wed, Oct 29, 2008 at 4:55 PM, Thierry D.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> production DB (distant Unix)?
> 
> Thank you!
> 
> ## Thierry
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
Robby R.  
Chief Evangelist, Partner

PLANET ARGON, LLC  
design // development // hosting

> **[Planet Argon](https://www.planetargon.com/)**
>
> Planet Argon is a Ruby on Rails development agency specializing in maintenance and support for existing Rails apps. Based in Portland, OR, Planet Argon has been a member of the Rails community since 2004.

[http://www.robbyonrails.com/](http://www.robbyonrails.com/)  
aim: planetargon

+1 503 445 2457  
+1 877 55 ARGON [toll free]  
+1 815 642 4068 [fax]

---

<div class="post-metadata">

**Author:** ![thithi32](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b782af/32.png) [@thithi32](https://www.ruby-forum.com/u/thithi32)\
**Post date:** [October 30, 2008, 4:31am UTC](https://www.ruby-forum.com/t/db-export-then-import/152085/3 "2008-10-30T04:31:31Z")

</div>

It’s different for every kind of database. Which database server are  
you using on your Vista machine?

On Oct 29, 4:55 pm, Thierry D. \<ruby-forum-incom…@andreas-

---

<div class="post-metadata">

**Author:** ![thithi32](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b782af/32.png) [@thithi32](https://www.ruby-forum.com/u/thithi32)\
**Post date:** [October 30, 2008, 5:00am UTC](https://www.ruby-forum.com/t/db-export-then-import/152085/4 "2008-10-30T05:00:53Z")

</div>

Alex Malinovich wrote:

> It’s different for every kind of database. Which database server are  
> you using on your Vista machine?
> 
> On Oct 29, 4:55ï¿½pm, Thierry D. \<ruby-forum-incom…@andreas-

what happened to sqldump ?

---

<div class="post-metadata">

**Author:** ![thithi32](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b782af/32.png) [@thithi32](https://www.ruby-forum.com/u/thithi32)\
**Post date:** [October 30, 2008, 11:42am UTC](https://www.ruby-forum.com/t/db-export-then-import/152085/5 "2008-10-30T11:42:51Z")

</div>

I guess I was tired yesterday, my message wasn’t very clear.  
The databases I’m using are sqlite3.  
So looking for “How to create a dump with sqlite3”, I fund and executed:

sqlite3 mydb \> mydb.dump

Well, it worked out fine. Watching inside the mydb.dump file I realized  
there’s a bunch of CREATE TABLE so I deleted them manually since I  
already executed ‘rake db:migration’ on the server.

I just couldn’t finish the migration because my Unix server tells me  
that I have to install sqlite3 when I’m trying to do

cat mydb.dump | sqlite3 mydb\_unix.sqlite3

The strange thing is sqlite3 was supposed to be installed on the server  
and the site seems to work… I’ll have to find that out.

Thanks for all the answers.

Thierry.

---

<div class="post-metadata">

**Author:** ![thithi32](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b782af/32.png) [@thithi32](https://www.ruby-forum.com/u/thithi32)\
**Post date:** [October 30, 2008, 1:49pm UTC](https://www.ruby-forum.com/t/db-export-then-import/152085/6 "2008-10-30T13:49:48Z")

</div>

Sorry, the following line

> sqlite3 mydb \> mydb.dump

should be

sqlite3 mydb .dump \> mydb.dump

For the rest it worked out fine for me.

---

<div class="post-metadata">

**Author:** ![thithi32](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b782af/32.png) [@thithi32](https://www.ruby-forum.com/u/thithi32)\
**Post date:** [December 20, 2008, 1:40am UTC](https://www.ruby-forum.com/t/db-export-then-import/152085/7 "2008-12-20T01:40:12Z")

</div>

This clock projects the time, date, or temp on the wall or ceiling  
[Welcome liangdianup.com - Hostmonster.com](http://www.liangdianup.com/clocks_1.htm) some people call  
it a ceiling clock but I call it a digital projection clock. I got the  
black one because at the time that was the only color  
they had. But now they have them in black and also in white.
