Ewimpex is a command line utility that allows you to list, backup and restore any or all knowledgebases (KBs) from the database. It is not necessary for the  application server, such as JBoss, to be running when you execute this command, so you can turn off access to the system during exports and imports. Ewimpex is included in the installation files on the server.

When running ewimpex commands, make sure to run them with root privileges. For Windows, open the Command prompt as an administrator.

Usage

The ewimpex utility has three commands: kblist, backup, and restore. Each command is described below.

kblist

The kblist command outputs a list of all available KBs in the database, one KB per line. Each line contains a tab-separated (\t) knowledgebase ID and name. For example: 

1 Demo
    2 Test KB
    3 Production KB

backup

The backup command exports selected KBs to a specified folder or a new backup.

To use this command, you must also enter at least one of these parameters:

You must enter "-" before the parameter letter when you use it with the backup command. KBs are saved using the original file names and the .xml.zip extension. All non-standard characters in file names are automatically replaced by "_".

restore

The restore command restores selected knowledgebases from existing backups, created either by this utility or the  interface.

To use this command, you must also enter at least one of these parameters:

If you are restoring a KB that already exists, ewimpex adds a prefix to the restored knowledgebase in order to avoid naming conflicts. For example, if you have a Demo knowledgebase installed and are restoring another Demo knowledgebase from the file, the restored knowledgebase is named 0_Demo. After restoration, you can log in to  as an administrator and rename or delete unneeded copies of the databases.

Common Options

In addition to the command-specific options listed above, there are several options that specify the database parameters and are common to all commands. If none of these options are set, ewimpex finds and uses the  installation data, so you need to use these options only when they differ from the installation data.

These options are common to all the commands:

Error Codes

On success, ewimpex returns a zero value. On error, the system provides an error message and returns a negative error code. These include:

Errors -7 to -999 are unspecified, unexpected errors.

Use Cases and Examples

Here are some example uses of the utility. In these examples and in practice, you can replace the letter with the name of the parameter preceded by a hyphen. For example, -a and --all are interpreted the same way by the utility. The examples below include the full parameter name so you don't need to refer back to the lists above.

When running ewimpex commands, make sure to run them with root privileges. For Windows, open the Command prompt as an administrator.

Get a list of all installed knowledgebases

Export all knowledgebases into a folder

Export one knowledgebase

Export a list of knowledgebases

Import all knowledgebases from a folder to  system

Existing knowledgebases will not be overwritten.

Import one knowledgebase

Reset the admin console password


Related articles