[ckan-discuss] Migrating data from CKAN 1.4 -> 1.8

Sean Hammond sean.hammond at okfn.org
Thu Oct 25 11:38:50 BST 2012


> I'm currently working on migrating daten.berlin.de out of beta and
> into a new environment. Since the portal is based on an old 1.4 CKAN
> and because we want to change some things around, I'm tending towards
> starting from scratch with a fresh CKAN 1.8 install.
> 
> For migrating the database (of datasets), I can see several options:
> 
> 1.) using the ckan-harvester extension 2.) writing a script that
> exports the dataset descriptions from the old 1.4 CKAN using the API,
> load them into the new CKAN 3.) dumping and reloading the database
> directly, hoping that it works (I don't really expect this to work
> smoothly, though)
> 
> For 1.) and 2.), would people recommend one over the other, and why?
> Or could I actually do 3.)?

I would probably go with 3, use the paster db dump command to make a
backup of the db from your current beta deployment, then on a new CKAN
1.8 deployment use paster db load to import the DB. I believe the load
command will automatically run the database migration scripts, so you
should get a version of your data upgraded to CKAN 1.8's database schema
(same as if you had used the paster db upgrade command on your live beta
instance to upgrade the database in place).

http://docs.ckan.org/en/ckan-1.8/paster.html#dumping-and-loading

I've done upgrades jumping multiple CKAN versions before, so if you have
problems with the migration scripts crashing I might be able to help.

I think any issues you have with the migration scripts will probably
take less work to overcome than it would take you to do 1 or 2.



More information about the ckan-discuss mailing list