ckan / ckanext-harvest

Remote harvesting extension for CKAN
130 stars 204 forks source link

Is it possible to mirror a ckan installation via the harvester? #396

Open xellos866 opened 4 years ago

xellos866 commented 4 years ago

Hello

This may be a feature request in some way.

I've done some testing while harvesting a ckan system via the "ckan_harvester" plugin. It occurs to us that data won't get deleted or made private when this happens on the target system:

Action on target system Harvester action as is Harvester action as assumed
dataset createt harvest (create) harvest (create)
dataset updated updated updated
dataset removed no action removed
dataset created as private no harvest no harvest
dataset updated from private to public harvest harvest
dataset updated from public to private no action removed

First the question if this is the expected behaviour? I can't find a clear definition on your documentation. I would assume now that the goal is to keep the data even if it get's deleted or made private on the target system.

In our case we need a setting to mirror the target system (as assumed in the table above), like:

{
    "mirror_target": true
}

System:

xellos866 commented 3 years ago

Hello,

little Update: we implemented this behaviour in a custom ckan harvester. The mirror option depends on the "force_all: true" configuration. If you are interested i could create an PR or expose the code some other way (patching of main functions were necessary).

Currently our system uses:

(our next milestone will be an Upgrade to Ckan 2.9.x)

Greetings

frafra commented 3 years ago

That would be great, thank you :)