MEGA Administration : Administrator Guide : Managing Repositories : Managing Repositories : Updating a Repository
   
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 MEGA repository:
text format (.MGR).
*For more details on .MG* file syntax, see "Command File Syntax", page 349.
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:
the MEGA Administration desktop (Web Front-End).
*See "Connecting to the Administration Desktop (Web Front-End)", page 7.
MEGA Administration (Windows Front-End) and select the repository concerned.
*See "Connecting to MEGA Administration (Windows Front-End)", page 4.
2. (Web Front-End) In the Administration tab, click the Tools pane and select the XMG/MGL/MGR > Import sub-folder.
The Mega File Import - Parameterization page appears.
(Windows Front-End) Right-click the repository concerned and select Object Management > Import.
The Import MEGA Data dialog box opens.
*To import a command file from MEGA, select File > Import > MEGA File.
3. In the Command File frame, click Browse to browse the folders and select the backup file.
4. (Web Front-End) Click Upload.
5. 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.
6. 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.
7. In the Checks frame, 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 MEGA repository.
Control writing access areas is selected when the MEGA 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.
8. In the Filters frame, 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 MEGA 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.
9. (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.
10. (Windows Front-End) 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", page 192 and "Rejects When Dispatching", page 193.
11. Click Import.
(Web Front-End) The report page appears.
(Windows Front-End) The report window appears showing the import progress.
 
(Windows Front-End) The Processing frame details the number of commands accepted and rejected.
When the import contains errors:
a reject report file is generated.
*See "Viewing rejects".
(Windows Front-End) an execution report file is available.
*See "Viewing the environment report file (Windows Front-End)".
Viewing rejects
To view the rejects (or errors) recorded during the import of the command file:
*(Web Front-End) In the Report frame, click the arrow in the Report File field and select Open.
*(Windows Front-End) Click the Report File button.
*The contents of the report file depend on import options. For more details on importing a command file, see "Managing Options", page 365.
Case of a text file import (MGR, MGL)
The report file appears and details all the rejects.
 
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
Rejected: the command is rejected
Warning: the command is accepted, but contains errors
Viewing the environment report file (Windows Front-End)
To view the import execution report:
*Click Report.
The report details the number of commands analyzed, executed and rejected for each command type.