Restore configuration JSON file
To restore an application with the command line, you must first create a JSON file, where you configure the settings, such as the restore type, archive file, application name, and so on. Essentially, the JSON file includes the same settings as you would configure using the FactoryTalk View SE Application Manager utility.
The following is a sample of the JSON file content that you can edit per your needs. All settings are case-insensitive. This sample means that:
- You will restore the entire application, including HMI servers, FactoryTalk Alarms and Events servers, and data server configuration.
- The archive file isFTViewDemo.apb, which is inC:/Users/Public/Documents.
- The type of the application to be restored is network distributed.
- The new application name to be restored isFTViewApp.
- The restored application will overwrite the existing application and HMI project.
- The restored application includes three areas:Line1_HMI,Line1_Alarms, andLine1_Data.
- In areaLine1_HMI, there is an HMI server calledftviewdemo_hmi, hosted onPC1with no redundancy configured.
- In areaLine1_Alarms, there is a FactoryTalk Alarms and Events server calledline1_tagftae, hosted onPC1with no redundancy configured.
- In areaLine1_Data, there is a FactoryTalk Linx data server calledFactoryTalk Linx, hosted onPC1with no redundancy configured.
{ "RestoreType":1, "ArchivePath":"C:/Users/Public/Documents/FTViewDemo.apb", "AppType":"Distributed", "NewAppName":"FTViewApp", "Overwrite":"Y", "Selections":[ { "Area":"Line1_HMI", "ServerType":"HMI", "ServerName":"ftviewdemo_hmi", "PriHost":"PC1", "SecHost":"Unavailable", }, { "Area":"Line1_Alarms", "ServerType":"FTAE", "ServerName":"line1_tagftae", "PriHost":"PC1", }, { "Area":"Line1_Data", "ServerType":"FTLinx", "ServerName":"FactoryTalk Linx", "PriHost":"PC1", "SecHost":"Unavailable", } ] }
The following table lists the settings in the JSON file.
Setting | Description |
---|---|
RestoreType | Required. Specify the restoring scope with one of the values:
TIP:
When you restore an APA or APB archive file, RestoreType and AppType should be valid and work with one another, which is the same as you would configure using the FactoryTalk View SE Application Manager utility.
|
ArchivePath | Required. Specify the full path to the archive file.
TIP:
Do not use the backslash symbol (\). Instead, use the slash symbol (/), for example, C:/Users/Public/Documents.
|
AppType | Required. Specify the application type in the archive file with one of the following values:
|
NewAppName | Required. Specify the new name of the application to be restored. |
Overwrite | Optional. Specify whether to overwrite the existing application and HMI project with one of the following values:
If you omit the setting, it is N by default.
TIP:
The local application of an APA archive file doesn't support overwrite.
|
Selections | Required. The section defines the area, server type, server name, primary host, and secondary host. Restoring an empty application is selected, but it must follow this format: "Selections":[] or "Selections":{} |
Area | Optional. Specify the name of the area to be restored. |
ServerType | Required. Specify the type of the server to be restored with one of the following values:
|
ServerName | Required. Specify the name of the server to be restored. |
PriHost | Required. Specify the primary server to host the restored application with one of the following values:
|
SecHost | Optional. Specify the secondary server to host the restored application. Ignore this setting if redundancy is not set up.
|
Provide Feedback