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 is
    FTViewDemo.apb
    , which is in
    C:/Users/Public/Documents
    .
  • The type of the application to be restored is network distributed.
  • The new application name to be restored is
    FTViewApp
    .
  • The restored application will overwrite the existing application and HMI project.
  • The restored application includes three areas:
    Line1_HMI
    ,
    Line1_Alarms
    , and
    Line1_Data
    .
    • In area
      Line1_HMI
      , there is an HMI server called
      ftviewdemo_hmi
      , hosted on
      PC1
      with no redundancy configured.
    • In area
      Line1_Alarms
      , there is a FactoryTalk Alarms and Events server called
      line1_tagftae
      , hosted on
      PC1
      with no redundancy configured.
    • In area
      Line1_Data
      , there is a FactoryTalk Linx data server called
      FactoryTalk Linx
      , hosted on
      PC1
      with 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:
  • 0
    : Restores only the HMI server.
  • 1
    : Restores the entire application, including HMI servers, FactoryTalk Alarms and Events servers, and data server configuration.
  • 2
    : Restores the application along with the entire FactoryTalk Directory.
  • 3
    : Restore the entire application, along with the entire FactoryTalk Directory and its logical security identifiers.
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:
  • Local
    : Local station
  • Station
    : Network station
  • Distributed
    : Network distributed
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:
  • Y
    : Overwrite
  • N
    : Not overwrite
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:
  • HMI
    : HMI server
  • FTLinx
    : FactoryTalk Linx data server
  • FTAE
    : FactoryTalk Alarms and Events server
  • OPCUA
    : OPC UA server
  • OPCDA
    : OPC DA server
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:
  • ComputerName
    , which means the name of a primary host computer.
  • localhost
    , which means the current computer.
  • DoNotRestore
    , which means do not restore the HMI server.
SecHost
Optional.
Specify the secondary server to host the restored application. Ignore this setting if redundancy is not set up.
  • ComputerName
    , which means the name of a secondary host computer.
  • DoNotRestore
    , which means do not restore the redundant HMI server.
  • Unavailable
    , which means the secondary server is not configured.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal