TheBB / aligulac

Source code for the Aligulac project: a statistical tool for the analysis of the SC2 pro and semipro scene.
http://aligulac.com
250 stars 31 forks source link

Database restore script? #290

Closed jknowles closed 7 years ago

jknowles commented 7 years ago

Hi,

I'm a new developer and trying to get a local copy of this repository working to try to contribute to the project. I'm getting stuck restoring the PostgreSQL dump file on my local machine.

Is there a script or documentation I could be pointed to so I can get that up and running?

This is a really cool project and I'm impressed at all the hard work here.

TheBB commented 7 years ago

Hi,

Where are you getting stuck? Any error message?

It should be fairly simple. Install PostgreSQL, create a database (name it aligulac, for example), then in the shell, as a user with R+W access to the aligulac database, you can run:

psql -d aligulac < dump.sql

And it should work.

Eivind

On Sun, Mar 19, 2017 at 10:38 PM, Jared Knowles notifications@github.com wrote:

Hi,

I'm a new developer and trying to get a local copy of this repository working to try to contribute to the project. I'm getting stuck restoring the PostgreSQL dump file on my local machine.

Is there a script or documentation I could be pointed to so I can get that up and running?

This is a really cool project and I'm impressed at all the hard work here.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

jknowles commented 7 years ago

Thanks for writing back.

I keep getting stuck with this error:

ERROR: relation "auth_user" does not exist
REVOKE
ERROR: role "aligulac" does not exist
ERROR: role "aligulac" does not exist
REVOKE
ERROR: role "aligulac" does not exist
ERROR: role "aligulac" does not exist
REVOKE

I am trying to pipe this into a Postgresql docker container using this command:

cat aligulac.sql | docker exec -i aligulac psql -d aligulac -U postgres

I have tried with two different users -- postgres and an admin user. What might be the cause here?

TheBB commented 7 years ago

Yeah, you get the error about the aligulac role if your user isn't called aligulac, but the data should still be there.

TheBB commented 7 years ago

The error about auth_user is just from trying to apply a foreign key constraint to a table that isn't part of the dump. It shouldn't be problematic.

jknowles commented 7 years ago

Thank you!

The error made me think something was wrong, but just tested and the data works fine now. Thanks for helping a newbie out.