[ckan-dev] Backing up Organizations

Ian Ward ian at excess.org
Mon Jan 12 14:14:27 UTC 2015


On Sun, Jan 11, 2015 at 9:10 PM, Michael Speth
<spethm at landcareresearch.co.nz> wrote:
> Is it possible to export and import organizations (without backing up the
> entire database)?

Hi Michael,

The ckanapi[1] command line tool supports dumping and loading organizations[2].

[1]: https://github.com/ckan/ckanapi
[2]: https://github.com/ckan/ckanapi/blob/master/ckanapi/cli/main.py

Use "ckanapi dump organizations ... > my_orgs.jsonl" to export and
"ckanapi load organizations ... < my_orgs.jsonl" to import.

If you want to get fancy you can use a pipe to skip the temporary
file, and use the "-p" options to dump/load with multiple connections
in parallel.

> The link below shows how to export users and datasets.
> http://docs.ckan.org/en/latest/maintaining/paster.html#dumping-and-loading-databases-to-from-a-file
>
> But how do you import the datasets and users?

ckanapi also supports dumping and loading datasets, but not users yet.

Ian



More information about the ckan-dev mailing list