Caché MultiValue Commands Reference
MVIMPORT
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Class Reference   
Search:    

Imports accounts from other MultiValue implementations to Caché MultiValue.

MVIMPORT backupfile [dirpath [targetpath]] [(code)]
Arguments
backupfile The file containing the information to restore. This is assumed to be in the native “save” format of the originating system (for example, a UniVerse BACKUP). It can contain data for one or more accounts (namespaces).
dirpath Optional — The location in which to restore certain directory files from a jBASE or UniVerse backup (other MultiValue implementations do not have “stray files”). This path is used to store any directories and files that are otherwise skipped because they do not directly relate to a VOC (“stray files”). MVIMPORT examines the backup and determines the lowest point in the tree of directories (the root) for each group of files. MVIMPORT then imports these subtrees into dirpath. If this argument is omitted, the default location for these stray files is platform-dependent. On Windows, MVIMPORT attempts to restore to the original path, so if the backup contains a file K:\stray, MVIMPORT restores them into K:\stray; if there is no K drive, the file goes nowhere and no error is issued. Restoring on a OSX, the file goes into ./~/stray On Windows, when dirpath is included, if the original drive exists, MVIMPORT will use it and ignore the dirpath.
targetpath Optional — The location to import the account to. If this argument is omitted, import into the MGR directory.
code Optional — A letter code governing the operation of MVIMPORT. Available values are A, C, L, M, O, and R.
MVIMPORT ignores any command line arguments it does not understand and is not prepared to handle.
Description
The MVIMPORT command used to move accounts from other MultiValue implementations to Caché. It does this by taking a backup file created by another MultiValue implementation and restoring it to Caché MultiValue. MVIMPORT supports backups created by UniVerse, jBASE, D3, Reality, MVBase, OpenQM and Power95. The features of MVIMPORT vary according to the type of backup being restored.
MVIMPORT is designed to be a restoration utility for migrating legacy MultiValue accounts to Caché. Users should become familiar with Caché administrator facilities for backup, restore, and other administrative functions.
Because MVIMPORT is designed as a migration aid, it only recognizes programs and data when performing its task. Any indices present in backupfile are ignored. Native Caché facilities for indexing need to be used to recreate indices after the import. Caché classes are not created. It is the responsibility of the application developer to create and use Caché classes as needed. You can use PROTOCLASS to create Caché classes corresponding to MultiValue data dictionary definitions.
Note:
MultiValue account manipulation requires %Admin_Manage privileges. This is normally associated with the SYSPROG account. For information on the Caché security model, see the Caché Security Administration Guide. For specific information on roles and privileges, please consult the chapter on Roles and the chapter on Privileges and Permissions in the Caché Security Administration Guide.
Letter Code Options
The following code values are supported:
Determining the Account Name
The account name is found on the backup from D3, Reality, MVBase, OpenQM and Power95. For a UniVerse backup, the account name is the last directory name in the file path. jBASE does not provide the account name, so the user will be prompted for an account name at the start of the import.
If the account exists, and the M, O, or R options were not specified on the command line, MVIMPORT prompts for a response. You can respond with the M, O, or R letter code, which have the same effects as the (M), (O), or (R) command line code options. For example:
Account 'DBIHELPDESK' already exists.
Enter 'M'erge,'O'verwrite,'R'ename or 'Q'uit:?
MVIMPORT creates a new account, namespace, and database for each account in the backup that does not already exist in Caché. All hash files (for example, database files) are restored to Caché globals in the created account. All non-hash files (for example, OS files in a directory) are restored to the home directory of the account, or as specified by the dirpath argument. MVIMPORT imports all valid directories by default, including empty directories. For details on the relationship between accounts and namespaces, and the naming conventions used for each, refer to MV Accounts and Caché Namespaces in Operational Differences between MultiValue and Caché.
If MVIMPORT is merging accounts using the M option, when duplicate record keys exist in Caché and on the import data stream, the Caché values are overwritten.
MVIMPORT always creates a new account in the default location, as a sub-directory of the Intersystems\Cache\Mgr directory. If you want to create the account in any other location (for example, on another disk), then the procedure is as follows:
  1. Prior to the MVIMPORT, create a blank MultiValue account with CREATE-ACCOUNT, specifying an alternate location. For example:
    SYSPROG: CREATE-ACCOUNT MYACCOUNT UV E:\data\MYACCOUNT
  2. Run MVIMPORT with the (M) option. This enables you to merge the account on the backup with the already created account.
Errors and Log Files
At the conclusion of a MVIMPORT operation (for all backups except UniVerse):