Installing Multiple Workers On the Same Server (Linux)

  • 7020583
  • 23-Dec-2009
  • 07-Aug-2017


Retain 3.x


I would like to speed up the archive process.  I have multiple mail servers (or post offices).  Would it be possible to run jobs concurrently against each mail server?


Yes.  You can install multiple Workers, create a job for each mail server that archives from that mail server only, and then associate a different Worker that you installed to each job.   You can apply this same concept to single mailboxes and distribution lists.  For example, Office 365 and Gmail customers may not be provided multiple mail servers; however, they can divide up their users by assigning them to different distribution lists; or, they can create various jobs and assign individual mailboxes to those jobs.  Either way, you'll need to install a Worker for every job you want to run concurrently; otherwise, a single Worker can only run one job at a time.

Installing Multiple Workers

1.  Browse to where the Retain install script is located.

2.  Run the command installer script as follows:  ./ addworker

3.  After accepting the terms of the license agreement, it will prompt you for a number to assign to the Worker.  Type in a number for the Worker that has not already been used.

This number gets appended to the RetainWorker directory it creates.  When Retain is first installed with a Worker, that Worker directory becomes "RetainWorker/"; thus, you can consider it Worker "0".  Each additional Worker would be "1", "2", and so forth. 

It shows you the Worker numbers that already installed on the system:

4.  Repeat step 2 through 3 for each additional Worker you wish to install.

5.  After you have completed the installation, now you log into the RetainServer web interface and add the Worker objects under the Worker configuration menu.

Refer to the Retain Admin and User Guide for instructions on adding a Worker object into Retain.  For the Retain 3.4 version, it is located on page 71 of the manual.  Refer to the Table of Contents for the current manual, you'll find it under the topic of "Worker".

This is the logical entity that holds the configuration settings you provide it.  These settings get stored in a configuration file that you then upload to the RetainWorker software; thus, each logical entity created in the RetainServer web interface should directly tie to a RetainWorker directory that you installed in steps 2 - 3.  When you create the Worker object in the RetainServer web interface, it will have you download a "bootstrap" or configuration file for the Worker.  These files are all named the same, "RetainWorker2.cfg".  The number "2" in the filename is NOT in reference to the Worker "number" (between Retain version 1 and version 2, the filename changed from RetainWorker.cfg to RetainWorker2.cfg).

So, when downloading your bootstrap files, you can either rename them to reflect the Worker directory they are going into or place each one in a separate folder on disk.

As for naming the Worker objects when creating them in the RetainServer web interface, you probably should consider including the RetainWorker directory number that will correspond with that particular Worker object (i.e., "RetainWorker for MailServer ABC", "RetainWorker1 for MailServer DEF", "RetainWorker3 for MailServer XYZ", and so forth).  Once the bootstraps are downloaded, you will be required to login to the RetainWorker web interface for each separate Worker you installed and uploading their corresponding bootstraps.  It sure makes it a lot easier when the name of your RetainWorker directory number is identified in the name of the object.  A lot of customers fail to do so and they get confused as to which RetainWorker web UI to go to when wanting to look at a particular Worker's job stats, etc.

Additional Information

This article was originally published in the GWAVA knowledgebase as article ID 1618.