Implementation > FEX RMA > Checking and importing RMA distribution file

Checking and importing an RMA distribution file

Introduction

Checking an RMA distribution file

Importing an RMA distribution file

This topic explains how to check and how to import an RMA distribution file.

Introduction

About distribution files

Distribution files are XML files that contain authorizations. They are useful for bulking import/export authorizations from/to the RMA Server. The file format is standardized so that distribution files can be processed by any RMA-compatible application.

Distribution file integrity and authenticity is ensured by a Local Authentication (LAU) block based on a hash function and a key (128 or 256 bit long).

Distribution file check

Checking a distribution file consists of making sure that it is valid without actually importing it to the RMA Server. This can be useful for large files: you do not risk trying to import the file and then discovering that the import failed because it is not valid.

Distribution file import

Importing consists of doing the same checks that are done in the check command above and then writing the authorizations contained in the file to the RMA database.

A distribution file can have one of the following file modes:

Additionally there are several import modes. Currently FEX only supports "restore" mode. In this mode all authorizations contained in the database are removed and the new ones are created from the import file.

Checking an RMA distribution file

To check a distribution file without importing it, enter the command:

rmaCmdLine.bat | rmaCmdLine.sh  --check  --user <user name>  --password <password>  --domain <domain>  --file <distribution file path>  --key <distribution file LAU>

Make sure that you specify the full path name to the distribution file. The distribution file to import must be accessible by the server.

The key should be either 128 bit (16 character) or 256 bit (32 character) long and in hexadecimal notation.

The outcome of the check command is either valid or invalid file.

Examples

Command with abbreviated parameters to check a file named dist.xml:

rmaCmdLine.sh  -c  -u myusername  -p mypassword  -d mydomain  -f /full/path/name/to/file/dist.xml  -k 3031323334353637

Command with full-format parameters, this time with a 256-bit key:

rmaCmdLine.sh  --check  --user myusername  --password mypassword  --domain mydomain  --file /full/path/name/to/file/dist.xml  --key 30313233343536373839414243444546

For more information about this command, and its parameters, refer to RMA Server administration commands.

Importing an RMA distribution file

To import a distribution file, you use the same command as for checking an RMA distribution file, except that you use the action --import (or -i) instead of --check (or -c).

Enter the command:

rmaCmdLine.bat | rmaCmdLine.sh  --import  --user <user name>  --password <password>  --domain <domain>  --file <distribution file path>  --key <distribution file LAU>

As long as the file is valid, the RMA Server imports the distribution file after checking it.

Related topics

About RMA

RMA Server administration commands