Merge Command

The dicfg merge command combines DiveLine configuration files with the existing files in the specified DiveLine dataroot and can perform specific actions on each entry in the files. Usage of the merge command is described in the following table.

NOTE: You can specify a dataroot on the local machine or a remote DiveLine connection, but not both.

Sample merge command:

dicfg.exe -dataroot c:\di\solution\dataroot merge 
c:\di\solution\dataroot\flatfiles

The merge command processes four file types: User, Group, ACL, and Password. See Flat Configuration File Format for the structure and expected file name and file type.

Invoking the merge command without an Action column does not delete users or groups, but merges new attribute values into the configuration.

For example, an existing DiveLine installation has users with the following attributes. Note that Bob does not have a set home directory.

User Home Directory
Alice "/sales"
Bob  
Carol "/marketing"

Then, perform a merge with the following input attributes:

User Home Directory
Alice "/private"
Bob "/research"
Carol  

The resulting configuration is:

User Home Directory
Alice "/private"
Bob "/research"
Carol "/marketing"

Notice that Carol’s home directory remains unchanged, while Bob’s and Alice's is updated.

If you wish to perform a specific action during a merge, add an Action column (with heading) to the Users or Groups input file. The values for an Action are update or delete.

For example, with the input:

User Home Directory Action
Alice   delete
Bob "/research" update
Carol   update

The result is:

User Home Directory
Bob "/research"
Carol "/marketing"

NOTE: Notice that the update action does not commit blank values. A blank value in a cell cannot replace a value; you must specify delete to erase an existing value.

For example, the following action sets Bob’s home directory to blank ("").

User Home Directory Action
Bob delete update

For both the save and merge commands, if you do not specify the -dataroot argument, dicfg checks the registry for which DiveLine dataroot to use.

On Windows, dicfg checks for the following registry value:

HKEY_LOCAL_MACHINE\SOFTWARE\DimensionalInsight\DI-DiveLine\dataroot

If this value does not exist in the registry, the fallback default dataroot value is:

C:\di\solution\dl-dataroot

On UNIX, if the dataroot argument is not provided, dicfg checks for the following OS environment variable:

DIDATA_DIR

For example, you may have specified:

export DIDATA_DIR=/di/solution/dl-dataroot

To see the value of this environment variable, type:

echo $DIDATA_DIR

If this environment variable is not present, the default Linux dataroot is:

/di/solution/dl-dataroot