Restoring a Retain System From Backup

  • 7020650
  • 10-Jun-2016
  • 18-Sep-2017


Reload for Retain

See Also: Backing Up Retain


A Retain server is backed up with Reload for Retain.

A Retain server is backed up with some other software rather than Reload for Retain. Explanation:

There are five components to a Retain Server.

1. The Retain software (exectuables)

2. The Retain Base Directory contents

  • The Base Directory contents is backed up by Reload for Retain
  • The Base Directory contents are not critical components to back up, but it is better that you do.
  • You will see directories off of the Base Directory with names such as: ebdb, export, backup etc.
  • Reload for Retain keeps the Base Directory content backups on the Reload server at the following location:

[Reload/Retain Backup Storage Path]/backups/[day]/base_data

3. The Retain Database

  • Reload for Retain only backs up MySQL databses.
  • Please assure that you have a backup solution for your Retain database even if Reload for Retain is not backing up your Retain database.
  • If your Retain database is not backed up, your Retain system cannot be recreated in any manner without the Retain database.
  • The Retain database could be on the Retain server or on a separate server from the Retain server.
  • Reload for Retain keeps the MySQL dumps on the Reload server at the following location:

[Reload/Retain Backup Storage Path]/backups/[day]/mysql_backup

4. The Retain Archive Files (blob Files)

  • Reload for Retain backs up Retain Archive Files by looking for their existance via a query to the Retain Database
  • Retain Archive Blob Files are kept amongst 16.7 Million Directories under the Retain archive location
  • All blob files are referenced in the Retain Database. As far as Retain is concerned, a blob file that is not registred in the Retain Database does not exist.
  • The Retain Archive location can be partitioned into additional Retain Archive locations. Here is how it works:
    • The Retain Archive location for the first Retain Archive Parition is defined in the Retain Configuration file called "ASConfig.cfg".
    • Additional Retain Archive locations are defined under "Storage Manager" in Retain Server Administration
  • Reload for Retain backs up Retain Archive Files to the following location on the Reload Server:

[Reload/Retain Backup Storage Path]/archive_data/[partition number]

5. The Retain Indexes

  • Reload for Retain backs up Retain Indexes.
  • Retain creates Indexes that enable the Search functionality it Retain. The Retain Indexes are derived from the content of the Retain Database and the Retain Archive Files.
  • Reload for Retain backs up Retain Index Files to the following location on the Reload Server:

[Reload/Retain Backup Storage Path]/index_data/index


1. Reinstall the version of Retain that you are currently using.

a. If your Retain Server uses MySQL on the Retain server which we are assuming failed, and is being rebuilt, then make sure to install MySQL. Make sure to install the version of MySQL that was originally installed on the Retain server. So for example, if you were using MySQL 5.5, don't install MySQL 5.6, install MySQL 5.5.

b. Do not start Retain as of yet, you need to first get all of the components in place.

c. Run the command to stop Retain, for example:   rcretain-tomcat7 stop

2. Copy the latest ASConfig.cfg file from the Reload for Retain backup to the proper path for the ASConfig.cfg based upon the platform. For example, on a SUSE Linux server, the path is:



cp /reload/retain/backups/168-thu_jun_16_2016/base_data/ASConfig.cfg  /opt/beginfinite/retain/RetainServer/WEB-INF/cfg

3. Copy the Base Data to whatever path is specified in the ASConfig.cfg file in the basePath line of the ASConfig.cfg file.

4. If your Retain database is in a MySQL Dump file, undump the file in the following manner:

a. Reload for Retain backs up the MySQL Dump file into a gzip file

b. Unzip the gzipped file in the following manner: gzip -d [mysql dump gzip file]

c. Import the Retain database in the following manner:

mysql -u root -p retain < [path to dump file]\[dump filename]

d. Get into the MySQL client and grant privledges to the Retain database to the Retain user specified in the ASConfig.cfg file:


mysql -u root retain -p

GRANT ALL PRIVILEGES ON retain.* TO 'retain'@'localhost' IDENTIFIED BY 'supersecretpassword';

5. Retain Archive Files should be placed where the ASConfig.cfg file indicates that Archive Files are kept.

If you have additional Retain Archive partitions, make sure to place the contents of those Archive partitions in exactly the same location as specified in the Storage Manager panel. See the figure below.


6. Indexes should be placed in the location indicated in the ASConfig.cfg file. 

NOTE: If you did not back up the Retain Indexes, they can be rebuilt. The Retain Indexes rebuild process can take quite a while. To rebuild the Retain Indexes, you must start the Retain Server.

Once all of the Retain data is in place, make sure to start the Retain Server. Log into the Retain Server and do a search and open up some old and new messages to confirm that everything is intact.

Additional Information

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