Use of the Import/Export Scripts for Backup (Scheduler Index)

The import and export scripts are available in the tools/arn-index directory 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).

Export

The export script allows for all metadata and configuration of an Scheduler Index Server to be exported to a zip file. The data exported is the same as that obtained with the equivalent option of the administration tool.

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 used to connect to the server.

-P password indicates the password used to connect to the server. 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 that will contain the exported metadata.

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 Scheduler Index 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.

Import

The import script allows for the importing of metadata contained in a zip file obtained using the export utility from Scheduler Index 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 used to connect to the server.

-P password indicates the password used to connect to the server. 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 path to the file that contains the metadata to be imported.

-replace is an optional argument that specifies that the elements included in the imported file will replace existing elements with the same name.

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.