9.8 npexport command (export Operational Contents)
Description
This command exports the Operational Contents and access permission settings (access permission groups or JP1 resource groups) that have been saved.
This command exports all versions of Operational Contents, including versions that were published in the past. If you want to export only the current Published Versions, use the nppubexport command (export Published Versions of Operational Contents). For details, see 9.12 nppubexport command (export Published Versions of Operational Contents).
This command must be executed while the system is running after setup has been completed. Open the command prompt as an administrator.
If this command is executed before any Operational Contents have been created, it exports a file that contains no Operational Content.
- Note
-
If you are using a directory server for user authentication, the access permissions for Operational Contents are determined by access permission groups and standard access permissions. On the other hand, if you are using JP1/Base for user authentication, the access permissions for Operational Contents are determine by JP1 resource group settings. Note that the only JP1 resource group information that can be exported by this command is the JP1 resource group names. The information needed for changing the JP1 resource group settings during import processing is not exported.
Format
npexportΔ[-cΔOperational-Content-ID-to-be-exported|-iΔpath-of-Operational-Content-IDs-list-file]Δ[-x]Δ[-lΔpath-of-export-list-file]Δpath-of-export-destination-file
For the path of the export file, specify an absolute path or a relative path consisting of a maximum of 200 characters. The file is output in ZIP format.
Use backslashes (\) for the delimiters. If a path contains a single-byte space, enclose the entire path in double quotation marks ("). In addition to these symbols, the only other symbols permitted in directory paths are single-byte colons (:) and single-byte periods (.) that indicate relative paths.
- Tip
-
If this command is executed before any Operational Content have been added, a file that contains no Operational Contents is created. If such a file is then imported by the npimport command (import Operational Contents) with the -d option specified, all Operational Contents that have been added will be deleted. This method is useful when you want to delete many Operational Contents in the batch mode.
Options
- -c Operational-Content-ID-to-be-exported
-
Specifies the Operational Content ID of a specific Operational Content that you want to export.
- -i path-of-Operational-Content-IDs-list-file
-
Specifies the absolute path or the relative path of the Operational Content IDs list file.
If the -c option and the -i option are both omitted, all Operational Contents are exported.
If the Operational Content IDs list file specified in the -i option contains a nonexistent Operational Content ID, only the existing Operational Contents and access permission settings are exported. In such a case, a warning message indicating that the corresponding Operational Content was not found is output.
- -x
-
Specifies that only the Operational Contents are to be output.
Note that if you are using JP1/Base for user authentication, this option is ignored, if specified.
- -l path-of-export-list-file
-
Specifies the absolute path or the relative path of the export list file.
When this option is specified, a list of exported Operational Contents is output as a text file.
Format of an Operational Content IDs list file
Specify Operational Content IDs delimited by the end-of-line code. Create the Operational Content IDs list file as a text file. If it is not a text file, an error message (KDCZ10147-E) will be displayed during command execution.
A character string without any spaces (single-byte or double-byte spaces) before and after each line is imported as the Operational Content IDs. If an Operational Content ID becomes an empty character string as a result of deleting the spaces before and after the line, that line is not imported.
When an EOF code is detected on a line, the character string up to the EOF code is imported as an Operational Content ID.
Note that comment lines cannot be added (by, for example, using hash marks (#)).
Format of an export list file
Header information is output at the beginning of the file and then messages are output in the following format:
[result-type]<T>[Operational-Content-ID]<T>[Operational-Content-version-ID]<T>[update-date-and-time([time-zone])]<T>[published-date-and-time([time-zone])]<T>[publish-status]<T>[Operational-Content-name]<T>[group-name]<T>[access-permission-group-name-1-or-JP1-resource-group-name-1]<T> ... [access-permission-group-name-10-or-JP1-resource-group-name-10]<CR><LF> [result-type]<T>[access-permission-group-name-1]<T>[access-permission-group-ID-1]<CR><LF> ... [result-type]<T>[access-permission-group-name-10]<T>[access-permission-group-ID-10]<CR><LF>
<T>: Tab character
<CR><LF>: Termination character (0x0D, 0x0A)
The following table provides the details of the messages.
Item |
Description |
---|---|
result-type |
Displays the execution result of the npexport command (export Operational Contents):
|
Operational-Content-ID |
Displays the ID of an Operational Content that was exported. |
Operational-Content-version-ID |
Displays the version ID of the Operational Content that was exported. |
update-date-and-time |
Displays the most recent date and time the exported Operational Content version was updated. Format: YYYY/MM/DD hh:mm:ss.SSS This is the date and time the Operational Content was saved or editing was finished in the Operational Content Editing Window. |
published-date-and-time |
Displays the most recent date and time the exported Operational Content version was published. Format: YYYY/MM/DD hh:mm:ss.SSS Note that even if the Operational Content was made private during export processing, the most recent date and time the Operational Content was published is still displayed. If the Operational Content has never been published, ----/--/--Δ--:--:--.--- is displayed. |
publish-status |
Displays the publication status of the exported Operational Content. The following are the two publication statuses:
|
Operational-Content-name |
Displays the name of the exported Operational Content. |
group-name |
Displays the group name of the exported Operational Content. |
access-permission-group-name |
Displays the access permission group name set for the exported Operational Content on the same line as the Operational Content name. The exported access permission group names are displayed on subsequent lines. Standard access permissions are displayed first and then the access permission group names are displayed in ascending order of their names. |
JP1-resource-group-name |
Displays the JP1 resource group name set for the exported Operational Content on the same line as the Operational Content name. |
access-permission-group-ID |
Displays the exported access permission group ID. |
The following shows an output example of an export list file:
Result Operational Content ID Operational Content Version ID Date Modified (JST) Date published (JST) Status Operational Content Name Group Name exported 268e3592-0133-1000-8002-00000ad23cbb-0 fe6dcb35-0145-1000-8000-0000ac11510b 2014/05/15 14:49:39.524 ----/--/-- --:--:--.--- [sample01] Upgrading web application version Sample contents exported 268e3592-0133-1000-8002-00000ad23cbb-0 fe6db084-0145-1000-8000-0000ac11510b 2014/05/15 14:49:37.793 ----/--/-- --:--:--.--- [sample01] Upgrading web application version Sample contents exported 268e3592-0133-1000-8002-00000ad23cbb-0 fe6cfabc-0145-1000-8000-0000ac11510b 2014/05/15 14:48:48.979 2014/05/15 14:49:26.935 Now being published [sample01] Upgrading web application version Sample contents exported 268e3592-0133-1000-8002-00000ad23cbb-0 fa07860b-0145-1000-8000-0000ac11510b 2012/08/21 14:15:56.940 2014/05/14 18:19:28.283 [sample01] Upgrading web application version Sample contents exported 357a2f3a-0133-1000-8001-00000ad23cbb-0 fe6cbed5-0145-1000-8000-0000ac11510b 2014/05/15 14:48:36.094 ----/--/-- --:--:--.--- [Description of sample01] Upgrading web application version Sample contents exported 357a2f3a-0133-1000-8001-00000ad23cbb-0 fa078688-0145-1000-8000-0000ac11510b 2012/08/21 14:16:02.550 2014/05/14 18:19:28.408 Now being published [Description of sample01] Upgrading web application version Sample contents exported fe6eb084-0145-1000-8000-0000ac11510b-0 fe6eb0c2-0145-1000-8000-0000ac11510b 2014/05/15 14:50:38.227 ----/--/-- --:--:--.--- Newly joined New procedure
Notes:
-
Static files used in Operational Contents, such as images and HTML files, are not exported by this command. You must copy static files manually and move them separately. For details about how to handle static files, see 6.9 Managing the static files used in Operational Contents.
-
If a file with the same name as the file specified as the output destination already exists in the same directory, an error occurs, in which case the file cannot be exported. Specify a nonexistent file.
-
Do not specify a network drive in a file path.
-
This command terminates abnormally if the amount of disk space available at the export destination is not sufficient for the size of the Operational Contents to be exported.
Note also that the command uses the folder specified in the TMP or TEMP environment variable as the work folder during execution. Therefore, before you execute the command, make sure that there is sufficient free disk space for the folder specified in the TMP or TEMP environment variable.
-
Do not change the contents of the output file. If the output file is changed before being imported, operation is not guaranteed.
Return value
Return value |
Description |
---|---|
0 |
The command terminated normally or terminated with a warning. |
1 |
The command terminated abnormally. |
2 |
A lock error occurred on the command. |
9 |
An execution permission error occurred. |
Example
- Example 1
-
This example exports Operational Contents under the following conditions:
-
The path of the export file is C:\work\repository.zip.
-
All Operational Contents and access permission settings are to be exported.
> Navigation-Platform-installation-directory\bin\npexport C:\work\repository.zip
-
- Example 2
-
This example exports Operational Contents under the following conditions:
-
The path of the export file is C:\work\repository.zip.
-
The path of the export list file that will be output after the export processing is C:\work\list.csv.
-
All Operational Contents and access permission settings are to be exported.
> Navigation-Platform-installation-directory\bin\npexport -l C:\work\list.csv C:\work\repository.zip
-
- Example 3
-
This example exports an Operational Content under the following conditions:
-
The path of the export file is C:\work\repository.zip.
-
The Operational Content with the specified Operational Content ID (85D412B4-BB5D-4a14-A331-B0D31B7E1297-1) and the access permission settings are to be exported.
-
JP1/Base is not used for user authentication.
> Navigation-Platform-installation-directory\bin\npexport -c 85D412B4-BB5D-4a14-A331-B0D31B7E1297-1 C:\work\repository.zip
-
- Example 4
-
This example exports Operational Contents under the following conditions:
-
The path of the export file is C:\work\repository.zip.
-
The path of the Operational Content IDs list file is C:\work\contentsId.txt.
-
All Operational Contents and access permission settings are to be exported.
> Navigation-Platform-installation-directory\bin\npexport -i C:\work\contentsId.txt C:\work\repository.zip
-
- Example 5
-
This example exports Operational Contents under the following conditions:
-
The path of the export file is C:\work\repository.zip.
-
All Operational Contents only are to be exported.
> Navigation-Platform-installation-directory\bin\npexport -x C:\work\repository.zip
-