4.0 Restoring Retain

Please call support for assistance in restoring your production Retain server. Currently this is a manual process. This will take effort but most of the time will be spent copying data.

Restoring Retain generally involves recreating the Retain server software and database, and moving the data back to the Retain server from the Reload server.

On the new Retain server:

1. Reinstall but do not configure the version of Retain that you are currently using. See the Retain Documentation

a. If your Retain Server uses an SQL database management software on the Retain server itself, which we are assuming failed and is being rebuilt, then make sure to install the same version  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. Stop Retain:   

SLES 11: rcretain-tomcat7 stop

SLES 12: systemctl stop retain-tomcatX.service. Where "x" is the version of tomcat (i.e., Retain 2.x uses tomcat5, Retain 3.x and 4.0-4.1.0.1 uses tomcat7, and Retain 4.2 or higher uses tomcat8)

Windows: Open Services and stop the Retain Tomcat service

On the Reload for Retain Server:

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.

On the Reload for Retain server the file will be found under:

[Reload/Retain Backup Storage Path]/backups/[day]/base_data/ASConfig.cfg

On a SUSE Linux Retain server the default path is: /opt/beginfinite/retain/RetainServer/WEB-INF/cfg

On a Windows Retain server the default path is C:\Program Files\beginfinite\retain\RetainServer\WEB-INF\cfg

For example, copy the ASConfig from the Jun 16, 2016 backup to the SUSE Linux Retain server:

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.

For example, if the bathPath on the original Retain server was \Retain you will find it in the ASConfig under <basePath>

<basePath>\Retain</basePath>

Other base data path will be listed under that section including:

<archivePath>\Retain\archive</archivePath>

<xmlPath>\Retain\xml</xmlPath>

<indexPath>\Retain\index</indexPath>

<backupPath>\Retain\backup</backupPath>

<licensePath>\Retain\license</licensePath>

<EBDBPath>\Retain\ebdb</EBDBPath>

<exportPath>\Retain\export</exportPath>

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

a. Copy the backup of the MySQL dump file to the Retain server. Reload for Retain backs up the MySQL Dump file into a gzip file and stores it in ~/retain/backups/<day>/mysql_dumps. For example,

/reload/retain/backups/095-web-apr_05_2017/mysql_dumps

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. Log into the MySQL client and grant privileges to the Retain database to the Retain user specified in the ASConfig.cfg file:

Example:

mysql -u root retain -p

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

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

Reload for Retain backs up Retain Archive Files to the following location on the Reload Server: If you have only one partition everything is in archive_1/

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

For example, if the archive storage location on the original Retain server was \Retain\archive you will find it in the ASConfig under <basePath>

<archivePath>\Retain\archive</archivePath>

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.

The RATS tool can be used to facilitate the transfer of data.

6. Indexes should be placed in the location indicated in the ASConfig.cfg file. There is just one index backup under ~/retain/index_data/index

For example, if the index storage location on the original Retain server was \Retain\index you will find it in the ASConfig under <indexPath>

<indexPath>\Retain\index</indexPath>

NOTE:If you did not back up the Retain Indexes, they can be rebuilt. The Retain Index rebuild process may take considerable time. This should be done on the restored Retain server.

7. Once all of the Retain data is in place:

a. Start the Retain Server on the production Retain server.

b. Log into the production Retain Server and do a search and open up some old and new messages to confirm that everything is intact.