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.
- --output filename.kds
Choose the name of the output file. Defaults to 'export.kds'.
- --compress
Turn on kds compression. If you set this your filename must end in
.kds.gz.
- --overwrite
Allow --output to overwrite files. Normally if --output exists the
command fails.
- --everything
Select all available objects for export. This includes stories,
media, templates, categories, sites, contribs, users and groups.
- --stories
- --media
- --templates
- --contribs
- --categories
- --sites
- --users
- --groups
- --alerts
- --list_items
These select all available objects, and their dependencies, for
export. May not be combined with --everything.
- --all
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.
- --story_id 10
- --media_id 10
- --template_id 10
- --contrib_id 10
- --category_id 10
- --site_id 10
- --user_id 10
- --group_id 10
- --alert_id 10
- --list_item_id 10
These select a single object by ID, and its dependecies. May be
repeated multiple times to select multiple objects.
- --widget_id 10
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'.
- --skip_dependencies
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!
- --verbose
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.