You can import Workbench content from specified folders. The imported Workbench content overwrites any existing Workbench content.
The credentials key configured for the IFCR component in the
WorkbenchConfig.xml
is used to determine which user is
running the import process. If this user does not have, or loses, administrator
rights on Workbench, any import that this user attempts to run will fail with
the error AccessDeniedException. For example, if you create a new user,
"smith", with admininstrator rights on Workbench, and also change the user in
the credentials store to "smith", the last modified by fields of any imported
types of content are subsequently set to "smith". If "smith" attempts to run an
import after losing administrator rights on Workbench, the import fails with
the error AccessDeniedException. You can override this behavior by specifying
the
ecr:lastModifiedBy
property in the JSON file of a
content-item
or a
page
.
Importing Workbench Content from a Specified Directory
The following command imports Workbench content from a specified folder:
runcommand.sh IFCR importContent relative_path source
where:
relative_path specifies the location within Workbench where the content is to be imported. The path is relative to the location of your application in the Workbench.
source is the pathname of the folder from which the Workbench content is imported. You can specify either an unzipped folder or a specific zip file.
For example, the following command imports thesaurus content from a folder named thesaurus:
runcommand.sh IFCR importContent thesaurus /localdisk/apps/Discover/config/import/thesaurus
The following example imports configuration for folder2 from a directory called folder2:
runcommand.sh IFCR importContent content/folder1/folder2 /localdisk/foo/content/folder1/folder2
Note
The importContent command deletes the Workbench content at the
relative_path
before importing the contents of source
directory.
Recommended relative paths for importing public format content using importContent command
The following table lists the relative paths where public format content imported by the importContent command is best stored:
Type of content / ecr:type |
Recommended relative path |
configuration |
configuration |
configuration-preview |
configuration/tools/preview |
configuration-tools |
configuration/tools |
configuration-xmgr |
configuration/tools/xmgr |
content-root |
content |
content-collection-folder |
content/SampleFolder1 where SampleFolder1 is the name of the content-collection-folder. Note that content-collection-folder can be nested. For example, the following relative path is also valid: content/SampleFolder1/SampleFolder2 |
content-item |
content/SampleFolder1/SampleContentItem where SampleContentItem is the name of the content-item. |
deployment-settings |
configuration/tools/deploymentSettings |
page |
pages/SampleSiteId/SamplePage1 where SamplePage1 is the name or URL of the page. Note that a page can be nested inside another page. For example, the following relative path is also valid: pages/SampleSiteId/SamplePage1/SamplePage2 |
page-root |
pages |
phrase |
phrases/UniqueId where UniqueId is the unique identifier of the phrase |
phrases-root |
phrases |
workspace |
workspaces/workspaceId where workspaceId is
the unique identifier of the workspace, for example
|
workspace-root |
workspaces |
redirect-group |
redirects/Default |
redirects |
redirects |
site |
/ |
site-home |
pages/SampleSiteId where SampleSiteId is the identifier of the site-home |
template |
templates/SampleTemplate where SampleTemplate is the template id |
templates-root |
templates |
thesaurus |
thesaurus |
user-segments |
userSegments |
Note
Use "/" (the forward leaning slash) to construct a relative path. For
example, the following is a valid relative path:
content/SampleFolder1
, but the following is not valid:
content\SampleFolder1
.
Importing an Application Configuration
The following command overwrites most Workbench content with the content stored in the folder specified as source:
runcommand.sh IFCR importApplication source
importApplication imports the following types of Workbench content:
If a folder for a particular type of content is not present in the specified source folder or zip, that type of content is deleted from the Workbench upon import. Thus, if the phrases folder is not present in the specified source folder or zip, phrases will be deleted from the Workbench and the phrasing feature will not work.
Note
If the content-items and keyword redirects being imported contain the searchTermExpansions attribute, the expanded terms specified in the attribute are assumed to be correct and the rules are built accordingly. If the Authoring Dgraph is not running during the import, a warning will be issued but the operation will continue.