MEGA Administration (Web) : Managing objects : Importing - Exporting with MEGA : Importing a command file
   
Importing a command file
You can update a repository by importing a command file produced by the repository backup tool, an export file of an object, or any other means of command file production.
To import a command file:
1. Connect to the Administration desktop.
*See "Connecting to the Administration Desktop", page 16.
2. In the Administration tab, click the Tools pane.
The management tree for tools appears.
3. In the tree, select the XMG/MGL/MGR > Import sub-folder.
The Mega File Import - Parameterization page appears.
4. In the Command File field, click Browse to browse the folders and select the backup file.
*The command file must not exceed 30 MB.
5. Click Upload.
6. 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.
7. 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.
8. 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.
9. 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.
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 142 and "Rejects When Dispatching", page 143.
10. Click Import.
The report page appears.
When the import contains errors, a reject report file is generated.
11. (if necessary) To display the rejects (or errors) saved during import of the command file, in the Report frame, click on the arrow in the Report File field and select Open.
*The contents of the report file depend on import options. For more details on importing a command file, see "Managing Options", page 407.
Case of a text file import (MGR, MGL): The report file appears and details all the rejects.