[ckan-dev] Import Datasets and Data Using Harvester

Sean Hammond sean.hammond at okfn.org
Mon May 6 07:50:41 UTC 2013


> I have 2 ckan instances; ckan1 and ckan2. I want to move datasets and the
> actual data from ckan1 to ckan2 such that it downloads from ckan2. I have
> installed the ckanext-harvest (release v2.0) and have managed to harvest
> from another cKan instance but it seems to link the download to the ckan1
> instance. How can I achieve this?

Are you talking about resource files that you've uploaded to CKAN's
FileStore?

Once you've moved the metadata (either by harvesting, or using a simple
paster db dump and paster db load) you then need to move the files.

As far as I know, there isn't a great, automatic way to do this yet.
Assuming you're using local file storage with the FileStore, you should
be able to manually copy the contents of your ofs.storage_dir from
server 1 to server 2. After that, a link to an uploaded file like
http://server1.com/data/foobar should work if you replace server1.com
with server2.com.

Next, you need to go into your CKAN database and change all the
server1.com references to server2.com. The references are in the
`resource` table in your CKAN database.




More information about the ckan-dev mailing list