[ckan-dev] How to maintain the database?

Cam Findlay cam at camfindlay.com
Mon Dec 4 08:47:40 UTC 2017


Hi Martin,

A big +1 for Stefan's datastore clean up script - we have reused on our
data portal (we also added some improvements to avoid locking up database
when clearing out really massive datastores).

Ours is over at
https://github.com/data-govt-nz/ckanext-dia/blob/master/ckanext/dia/commands.py#L44


Makes me think we should turn this into an extension to help reuse and
improvements?

C.


On 2 December 2017 at 07:14, Martin Szyszlican <MSzyszlican at jus.gob.ar>
wrote:

> We sometimes re-upload datasets after a failed or incomplete datapusher
> run, and we would like to delete everything unused from the database. We
> have reached a point where the DB is too big, and it´s slowing down the
> server, which makes the datapusher crashes more frequent.
>
>
>
> I know I can call resource.purge or datastore_delete on a single resource,
> but how do I detect everything that is deletable? Is there a maintenance
> command already created for this?
>
>
>
> *Martín Szyszlican*
> Programa Justicia Abierta | Secretaría de Planificación Estratégica
> *mszyszlican at jus.gob.ar <mszyszlican at jus.gob.ar>*
> (011) 5300-4000 int. 76067
>
> [image: logo_minjus]
>
>
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20171204/dd02ea3d/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 12218 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20171204/dd02ea3d/attachment-0003.png>


More information about the ckan-dev mailing list