krang_import - import Krang data sets (.kds files)
List the contents of export.kds, but don't import anything:
$ krang_import --list export.kds
Import the contents of export.kds into the system:
$ krang_import export.kds
This script imports the contents of a Krang Data Set (.kds) file into a Krang instance. Set the instance to work on using the KRANG_INSTANCE environment variable or the first one in krang.conf will be used.
Just list the contents of the data set, don't import.
Never attempt to update existing objects, even when duplicates exist. You probably don't want this option unless you're importing into an entirely empty system and you want to know if that's not the case.
Ignore UUIDs for the purpose of finding matches to update. This essentially reverts Krang to its behavior before v2.008.
Only use UUIDs for the purpose of finding matches to update. Matches using other fields (URL, name, etc) will be treated as errors.
The --skip option tells the importer to not load a certain class of object from the KDS file. This is primarly used to skip loading of sites and categories while loading stories, media or templates.
For example, to load a KDS file containing templates without loading the categories and sites that may be present in the file:
krang_import --skip sites --skip categories templates.kds
Note that the sites and categories are still used to place the templates in the proper place on the target system, but they will not overwrite any existing data.
This option is necessary when importing a KDS file created via ``krang_export --skip_dependencies''
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.