Updating a Repository
Importing command files
You can update a repository by importing the command file produced by the repository backup tool, export of an object or any other means of command file production.
You can import two types of command file into a HOPEX repository:
text format (.MGR).
*For more details on .MG* file syntax, see Command File Syntax.
MEGA XML format files. These files have .XMG extension and contain commands or data (objects and links).
*For more details on MEGA XML data exchange format, see technical article MEGA Data Exchange XML Format EN.
To import a command file:
1. Connect to HOPEX Administration and select the repository concerned.
2. Right-click the repository concerned and select Object Management > Import.
The Import HOPEX Data dialog box opens.
*To import a command file from HOPEX, select File > Import > HOPEX File.
3. In the Command File pane, click Browse to browse the folders and select the backup file.
4. Select the types of Processing to be executed:
You can update:
the Metamodel (repository structure)
the Data (most frequent case)
the Technical Data (descriptions, requests, as well as users).
*If the file includes commands that do not match the type you have selected, these commands are ignored.
5. Select the Save frequency of the modifications.
*Note that there is no optimal save frequency:
Standard frequency saves at each "Validate" command in the command file and at the end of the file. This type of frequency is useful when the command file has been written by a user.
At end is generally sufficient if the file is not very large.
At end if no reject encountered saves the changes only if no rejects were encountered.
Never is used to carry out tests before the effective update, for example for syntax checking.
Every 5000 commands: each save is quite long. You can speed things up or slow them down by saving every 100, 200, 500, 1000 or 5000 commands.
*Large files may cause memory problems when updating. To avoid such problems, you should decrease the intervals between saves.
6. In the Checks pane, the checks to be carried out are selected automatically, based on the file extension:
Check Absolute Identifiers is not selected in the case of a command file that does not come from a HOPEX repository.
Control writing access areas is selected when the HOPEX Power Supervisor technical module is available on the site, ensuring that the user who executed the update has the corresponding writing access in the repository.
*For command files with the MGR extension (repository backup), absolute identifiers are included in the imported objects and writing access levels are maintained.
*For command files with the MGL extension (log extraction or backup logfile), the absolute identifiers are included in the imported objects. The writing access levels are maintained if the updates are consistent with the writing access diagram for the environment.
*These controls are not carried out if the user level is "Administrator", this enables the data restorations.
7. In the Filters pane, select the import behavior to be applied:
Standard Reprocessing changes creation of an already existing object into a modification, or into creation of an object of the same name preceded by a number if their absolute identifiers are different.
Reassign User ignores the writing accesses contained in the imported file. All elements in the imported file are given the same writing access level as the user executing the import. This is useful when you have the HOPEX Power Supervisor technical module. The creator and modifier names are replaced with the name of the user executing the import.
*It is recommended that you enable this option when the import file comes from an environment where the writing access diagram is not the same as the one for the environment where this file is being imported.
8. (Optional: Windows Front-End) Select the Log Updates option if you want to update the repository log, if this log will be exported to another workstation without the file being imported.
*This option is an advanced operation, MEGA recommends that you contact MEGA support before selecting this option.
9. Selecting Include Object Logs allows you to also import object histories.
*For more information on object logs, see Viewing Object History.
The options you select are controlled by the software, based on the file extension and the standard processing to be applied. If your choices are not consistent with the file extension, a message box informs you of this fact and its possible consequences.
*For more details on the main causes of rejects, see Dispatch Conflicts and Rejects When Dispatching.
10. Click Import.
The report window appears showing the import progress.
The Processing pane details the number of commands accepted and rejected.
When the import contains errors:
a reject report file is generated.
an execution report file is available.
Viewing rejects
To view the rejects (or errors) recorded during the import of the command file:
1. Import the command file
2. Click the Report File button.
*The contents of the report file depend on import options. For more details on importing a command file, see Options.
Case of a text file import (MGR, MGL)
The report file appears and details all the rejects.
Example of reject file at MGR file import
Case of a MEGA XML import (Windows Front-End)
The view window for the report file appears and details the Commands contained in the imported file and the Result of execution of each command:
Accepted: the command is accepted
Error: the command is rejected
Warning: the command is accepted, but contains anomalies
Viewing the import execution report file
To view the import execution report:
1. Import the command file
2. Click Report.
The report details the number of commands analyzed, executed and rejected for each command type.