Importing a SQLite3 dump back into the database

I feel like this is a stupid question because it seems like common sense . . . but no google search I can put together seems to be able to give me the answer!

I know how to get data OUT of a sqlite3 database using the .dump command. But now that I have this ASCII file titled export.sqlite3.sql . . . I can't seem to get it back INTO the database I want.

My goal was to transfer the data I had in one rails app to another so I didn't have to take all sorts of time creating dummy data again . . . so I dumped the data from my first app, got rid of all the CREATE TABLE statements, and made sure my schema on my second app matches . . . now I just have to get it IN there.

Would anyone mind helping me out? And when you find a way, will you tell me what you plugged into the google, 'cause I am beating my head open with a spoon right now over what I thought would be an easy find.

Answers


cat dumpfile.sql | sqlite3 my_database.sqlite

This is modified from the sqlite3 getting started guide.


Need Your Help

Slow to start an powershell script with no internet

powershell

I run a Powershell script on a computer that has no Internet connection. But it takes about 30 seconds to start it. How do I solve it?

Delphi Form with custom constructor as the mainform?

delphi constructor tform

I want to have a MainForm that is derived from a BaseForm that has a custom constructor. Since this is the Mainform, it is created by a call to Application.CreateForm(TMyMainForm, MyMainForm) in the

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.