Extension Datastore Dumper


Extension Basics

Title
Datastore Dumper
Name
ckanext-datastore-dumper
Type
Public extension
Description
CKAN extension that generates blob files from datastore and uploads them to filestore, reducing load on CKAN and Postgres by serving downloads directly from filestore.
CKAN versions
Download-Url (zip)
Last commit
a year ago (2024-04-23 11:13:11)
Url to repo
Category
Data Management & Quality


Background Infos

Description (long)
Show details

ckanext-datastore-dumper

When there is a high volume of requests on the datastore dump URL, it creates a heavy load on both the CKAN and Postgres database servers. In order to alleviate this load, this extension generates a blob file, uploads it to filestore, and then serves downloads directly from filestore.

How This Works

It runs a separate job each time when the datastore table is updated via the datastore create/update action. While the blob upload is in progress, the data is served via a generic datastore dump URL. Once the upload is completed, the data is served directly from the filestore. It also works with s3filestore.

Installation

To install ckanext-datastore-dumper:

  1. Activate your CKAN virtual environment:
. /usr/lib/ckan/default/bin/activate
  1. Clone the source and install it on the virtualenv:
git clone https://github.com/datopian/ckanext-datastore-dumper.git
cd ckanext-datastore-dumper
pip install -e .
pip install -r requirements.txt
  1. Add datastore_dumper to the ckan.plugins setting in your CKAN config file (by default the config file is located at /etc/ckan/default/ckan.ini).

  2. Restart CKAN:

sudo service apache2 reload
  1. Run CKAN background job worker:
# CKAN >= 2.9
paster --plugin=ckan jobs worker --config=/ckan.ini

# CKAN < 2.9
ckan -c ckan.ini jobs worker

Config Settings

If you are using ckanext-noanonaccess extension then allow this blueprint:

ckanext.noanonaccess.allowed_blueprint = datastore_dumper.dump

License

AGPL

Version
Version release date
(not set)
Contact name
Datopian
Contakt email
(not set)
Contact Url
(not set)


Installation Guide

Configuration hints

Requires CKAN background job worker. Compatible with s3filestore. Reduces database load for datastore downloads.

Plugins to configure (ckan.ini)
datastore_dumper
CKAN Settings (ckan.ini)
# ckanext.noanonaccess.allowed_blueprint = datastore_dumper.dump
DB migration to be executed
(not set)
<< back to Extensions