To import a liquid feedback database dump you will need a postgres(http://www.postgresql.org) installation where you store the dump in. The ant(http://ant.apache.org) script expect to access the database as user postgres with the password postgres. It also expect the command line tool psql in the path and the dump compressed with gzip.
The main preparation and configuration is done in the property file lgfb.properties where you setup the jdbc driver and the other stuff for the database connection. For the moment two versions of the views exist.
The default is lqfb2-db you may change it by setting the property database.script.dir .
To change the path of the psql tool you can use the property pgsql.
To import the graph directly with ant, there is an ant task ImportGraph you could use inside of eclipse, as we need the whole emf stuff for it.
The ant ask is located in the plugin de.urszeidler.lqfb.dataimporter and is installable from the zipped update site via the /de.urszeidler.lqfb.dataimporter.feature. You simply install the /de.urszeidler.lqfb.dataimporter.feature to have the task enabled. The ant process need to be started in the VM of eclipse(in the JRE tab of the start configuration).
Imports the graph data from the lqfb dump. It uses the same code as in [import raw data to local store] it reads the configured graph and stores it in the defined local store.
Attribute | Description | Required | default |
---|---|---|---|
newgraphname | The name of the imported graph. | yes | |
databaseurl | The url for the input database. | yes | |
databaseuser | The databsae user. | yes | |
databasepass | The datapase pass. | yes | |
outputdbtype | The type of the output db de for the Derby db and pg for postgres. | yes | |
createoutputdb | Creates the database, works with derby not with pg | no | false |
outputdatabaseurl | The urls for the datastore | yes | |
outputdatabaseuser | The database user | yes | |
outputdatabasepass | The pass for the user | yes | |
closeinputstore | Closes the input store after the import. | no | false |
closeoutputstrore | Closes the output store, if the store is a Derby db it also shuts down the database, as Derby normally works in single mode. | no | false |
First of all, read the terms of your dump.
The import has two phases.
In the first a new database and user is created, while an old one is dropped, and the dump will be unzipped and imported in the newly created database. Some basic view are also created.
The ant target for this action is :
The ant script is controlled by some properties
Be aware the user and the database will be dropped first, per default the user name is the database name.
In the second the concrete views for the graph is created. The second step depends on what data you like to import.
The only property is
When you run Ant inside of eclipse and have the ant task installed you could import all graph directly after the database import.
The only important properties are :
ant setup.lqfb.database -Ddatabase.import.file.gz=/liquidfeedback_piratenpartei_2012-09-04_03-16_CEST.sql.gz -Ddatabase.name=lqfb_2012_09_04
will setup a databse from the dump with the name lqfb_2012_09_04
ant setup.lqfb.database setup.graph.delegation -Ddatabase.import.file.gz=/liquidfeedback_piratenpartei_2012-09-04_03-16_CEST.sql.gz -Ddatabase.name=lqfb_2012_09_04
will setup a database from the dump with the name lqfb_2012_09_04 and also define the delegation views
ant setup.members.voting.initative -Ddatabase.name=lqfb_2012_09_04
Will setup the voting view for the database lqfb_2012_09_04.
ant setup.lqfb.database import.all.graphs -Ddatabase.import.file.gz=/file.sql.gz -Ddatabase.name=lqfb_2013_01_06_be -Dgraph.output.db.dir.path=/path.to.db
will import the database and then import all available graphs in the defined store.
After you setup a database you can [import raw data to local store].
There are some other useful targets.
Wiki: Home
Wiki: ant lqfb reports
Wiki: import many lqfb dumps
Wiki: import raw data to local store
Wiki: setup reporting