Use of the Import/Export Scripts for Backup

The import and export scripts are available in the bin directory tools/arn-index of the platform. They are provided in two versions: import.sh and export.sh (for Linux systems) and import.bat and export.bat (for Windows systems).

The export script allows for all metadata and configuration of an ARN-Indexer server to be exported to a zip file. The metadata exported is the same as that obtained with the equivalent option of the administration tool (see section Aracne Server Configuration).

The format in which the script is invoked is as follows:

export -h host -p port -l login -P password -f outputFilename

where:

-h host indicates the name or IP address of the machine where the server is launched.

-p port indicates the port number at which the server is launched.

-l login indicates the login name with which the server connection is made.

-P password indicates the password with which the server connection is made. You can encrypt your password using the script encrypt_password. That way you can avoid entering it in plain text. If the password is encrypted, prefix it with encrypted: E.g. -P encrypted:Gr16MjvuXhRzPtPH/yTXHw==

-f outputFilename indicates the name of the zip file to which the metadata is to be exported.

Below is an example of running the export command:

export -h localhost -p 9000 -l admin -P admin -f backup.zip

This command exports the full metadata of the ARN-Indexer server being run in the local machine on port 9000. Access to the server is done using the login admin with the password admin. The result of the export is saved to a file known as backup.zip.

The import script allows for the importing of metadata contained in a zip file obtained using the export utility from ARN-Indexer server.

The format in which the script is invoked is as follows:

import -h host -p port -l login -P password -f inputFilename [-replace]

where:

-h host indicates the name or IP address of the machine where the server is launched.

-p port indicates the port number at which the server is launched.

-l login indicates the login name with which the server connection is made.

-P password indicates the password with which the server connection is made. You can encrypt your password using the script encrypt_password. That way you can avoid entering it in plain text. If the password is encrypted, prefix it with encrypted: E.g. -P encrypted:Gr16MjvuXhRzPtPH/yTXHw==

-f inputFilename is the file containing the metadata to be imported.

-replace is an optional argument that specifies if existent elements with the same name as others included in the imported file should be overwritten.

For example:

import -h localhost -p 9000 -l admin -P admin -f backup.zip -replace

This imports the metadata contained in backup.zip to the server running in the local machine on port 9000. Access to the server is done using the login admin with the password admin. Information and warning messages returned by the server as a result of the import are written to the console.

These scripts exit with code 0 when there are no errors; otherwise, they return 1.