0

I have a working rails app on my local mac osx environment working with a local postgres database.

I have managed to get a sample app up and working on EBS using puma and mysql. I get that pushing the code up is a matter of using "git aws.push" - but what do i need to do to push the data up the the EBS environment (i'm happy to use either PG or mysql on EBS - but i'm guessing PG is the better choice given that's what the local app uses - if so, how would i need to configure my database.yml for PG on EBS)?

In short:

  1. how do i define and create the database on EBS?
  2. how do i do the equivalent of rake db:migrate in the EBS environment?
  3. how do i push the data in the tables up to EBS?
user1051849
  • 2,307
  • 5
  • 26
  • 43

1 Answers1

0

I can't answer your question about setting up the database on EBS, but you don't want to try to push your database files directly. If you want to populate some data in your rails app database, you should make that part of your app. This question discusses various ways to seed a database with rails.

If that is not an option for some reason, you would want to use pg_dump, upload the file, and use pg_restore if you are using postgres on the EBS side. If you are using mysql on the EBS side, you would need to pg_dump to an sql format, and use whatever mechanism mysql offers to import that SQL.

Community
  • 1
  • 1
Jim
  • 475
  • 2
  • 7