How-to purge a ckan catalogue instance
From Gcube Wiki
Revision as of 11:51, 26 September 2019 by Francesco.mangiacrapa (Talk | contribs) (→Actions needed to purge a CKAN instance configured in the D4Science Infrastructure)
Actions needed to purge a CKAN instance configured in the D4Science Infrastructure
1. Purge the DB instance;
2. Purge the Solr Index (without the shutting down of Solr server) by performing the query:
<delete><query>*:*</query></delete> //the "match all docs" query in a delete <commit/> //the commit
3. Reconfigure the DB instance to add support for the installed plugins (run the commands as ckan user):
. /usr/lib/ckan/default/bin/activate ; paster --plugin=ckanext-harvest harvester initdb --config=/etc/ckan/default/production.ini . /usr/lib/ckan/default/bin/activate ; paster --plugin=ckanext-spatial spatial initdb --config=/etc/ckan/default/production.ini . /usr/lib/ckan/default/bin/activate ; cd /usr/lib/ckan/default/src/ckanext-ga-report ; paster initdb --config=/etc/ckan/default/production.ini . /usr/lib/ckan/default/bin/activate ; paster --plugin=ckanext-rating rating init --config=/etc/ckan/default/production.ini
4. Create a Sysadmin user (run the commands as ckan user):
. /usr/lib/ckan/default/bin/activate cd /usr/lib/ckan/default/src/ckan paster sysadmin add [username] -c /etc/ckan/default/production.ini