[ckan-dev] Backing up Organizations

Michael Speth spethm at landcareresearch.co.nz
Wed Jan 14 02:48:39 UTC 2015


Hi Ian,
  Thank you very much for posting this solution.  I have added<https://forge.puppetlabs.com/conzar/ckan/changelog> ckanapi to the ckan puppet module<https://forge.puppetlabs.com/conzar/ckan> which is now available in 1.0.9 (as an option).

Thanks!


On Sun, Jan 11, 2015 at 9:10 PM, Michael Speth
<spethm at landcareresearch.co.nz<https://lists.okfn.org/mailman/listinfo/ckan-dev>> 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


--
Michael Speth
DevOps Computer Engineer
Landcare Research Consultant

________________________________

Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails.
The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20150114/e38bea66/attachment-0003.html>


More information about the ckan-dev mailing list