Ckan Backup and Restore

I am trying to write some documentation on how to restore a CKAN instance in my organization.

I made a backup and successfully restored the CKAN database and resource folder, but I do not know what I need to do with datastore db.

What is the practice?

Use pg_dump to delete a database or initialize it from a resource folder (if there is a way)?

Thanks. Alex

+5
source share
1 answer

CKAN backup databases (primary and Datastore one, if you use) with pg_dump . If you use Filestore, you need to take a backup of the files in the directory specified by ckan.storage_path (the default is /var/lib/ckan/default )

Restore database backups (after createdb is createdb ) using psql -f . Then run paster db upgrade just in case with an older version of ckan. Then paster --plugin=ckan search-index rebuild . With emergency use of rebuild_fast instead of rebuild , but I think it might create some duplicate entries, so to be sure that you could do rebuild -r , do it again carefully, but slowly.

initialize [data warehouse database] from the resource folder (if there is a way)

I do not think that CKAN Data Pusher has a command line interface to push all resources. It would be a good plan for you to write one and submit a PR for everyone.

+4
source

Source: https://habr.com/ru/post/1244228/


All Articles