krang_export - export Krang data sets (.kds files)
Export everything in the system into export.kds:
$ krang_export --everything
Export just templates and their dependencies into export.kds:
$ krang_export --templates
Export just a single story (ID: 10) and all it's dependecies to a file called cool_stories.kds:
$ krang_export --story_id 10 --output cool_stories.kds
For more options see the OPTIONS section below.
This script creates a Krang Data Set (.kds) file containing Krang objects. This file can then be used with krang_import to load data into another system.
Choose the name of the output file. Defaults to 'export.kds'.
Turn on kds compression. If you set this your filename must end in .kds.gz.
Allow --output to overwrite files. Normally if --output exists the command fails.
Select all available objects for export. This includes stories, media, templates, categories, sites, contribs, users and groups.
These select all available objects, and their dependencies, for export. May not be combined with --everything.
You can use --all=story to mean --stories, --all=category to mean --categories, etc. This also works with objects from addons which are available for datasets, so if your addon provides ``widgets'' you can export them all with --all=widget.
These select a single object by ID, and its dependecies. May be repeated multiple times to select multiple objects.
You can also specify IDs for addon objects here. So if you have an addon which provides widgets you can get widget 10 with '--widget_id 10'.
Omits all related/linked objects, limiting the KDS file to the specific items you specify. Use this with caution: this is a new, only lightly-tested feature, and if you're going to do anything other than re-importing to the same system (or aren't sure the related objects will be present and have unchanged IDs when you import), you'll be missing essential data!
Prints a running dialog of what's happening. Repeat (--verbose --verbose) and you'll be treated to a directory listing of the created .kds at the end.