Importing a data snapshot: Difference between revisions

From OpenHatch wiki
Content added Content deleted
imported>Paulproteus
imported>Paulproteus
Line 28: Line 28:
* We don't snapshot every single table. If you find there's something that we don't publish that we should, do [http://openhatch.org/bugs/ file a bug]!
* We don't snapshot every single table. If you find there's something that we don't publish that we should, do [http://openhatch.org/bugs/ file a bug]!


* '''Known issue''': It's possible to set up the database incorrectly, and then end up with a warning/error like this: "Incorrect string value: '\xC8\x9B' for column 'first_name' at row 1". That issue can be fixed; just re-create your database as described in the README.mkd file. (If you need help, come find us on #openhatch.)
* '''Known issue''': If your MySQL database isn't set up for Unicode, you could get a warning/error like this: "Incorrect string value: '\xC8\x9B' for column 'first_name' at row 1". That issue can be fixed; just re-create your database as described in the README.mkd file. (If you need help, come find us on #openhatch.)


[[Category:Hacking_OpenHatch]]
[[Category:Hacking_OpenHatch]]

Revision as of 16:32, 1 November 2010

When you get your own instance of the OpenHatch code running, you'll discover you're missing the data that are on the main OpenHatch site. So we take periodic snapshots of the data on the main openhatch.org site.

Where you can find the snapshots

How to use a snapshot

To load a snapshot into your database, you can run this command from your local install:

./bin/mysite loaddata snapshot.json

You'll see output that looks something like this:

Installing json fixture 'snapshot' from absolute path.
Installed 25288 object(s) from 1 fixture(s)

You can test that it worked by loading up your local people page and the live one. Do you have the about the same number of people? Click on these things:

More about this

  • We go through some effort to remove private information before we publish user data in these snapshots. The code for that is in snapshot_public_data.py.
  • We want to be saving these snapshots periodically, hopefully once a day. We don't do that yet.
  • We don't snapshot every single table. If you find there's something that we don't publish that we should, do file a bug!
  • Known issue: If your MySQL database isn't set up for Unicode, you could get a warning/error like this: "Incorrect string value: '\xC8\x9B' for column 'first_name' at row 1". That issue can be fixed; just re-create your database as described in the README.mkd file. (If you need help, come find us on #openhatch.)