> > > Step-By-Step Instructions to Back-up Cleo Clarify Server

Step-By-Step Instructions to Back-up Cleo Clarify Server

18th June 2019

Earlier Posts

In an earlier post, we reviewed The Automation of Suspending/Stopping/Resuming of Cleo Clarify.

In another supporting post, we discussed Downloading and Saving a Workspace with 7ZIP


In our post below we will use this concept with the backing-up of the Postgre database and supporting directories

Cleo strongly recommends using a third-party tool of your choosing to accomplish the backup of important Clarify file system resources.
Minimally these two locations must be backed up:

  • Clarify Server installation directory
  • Clarify Server Workspace directory

These important directories contain files and folders that are essential for the deployment/installation of server projects.

Logs folder

All content can be considered optional.

  • logs/processes: viewed from Admin Console (Auditor)
  • logs/(resource monitor): viewed from Admin Console
  • logs/database_status_pgsql_error.log
  • logs/database_status_pgsql_output.log
  • logs/start_database_pgsql_error.log
  • logs/start_database_pgsql_error.log
  • logs/pgsql.log

Storage folder

Note that some are required.

  • storage/compiledRules (Data generated at install time for Clarify objects and project install time for user objects.) -(Required)
  • storage/compiledMetadata (Data generated at install time for Clarify objects and project install time for user objects.) -(Required)
  • storage/schemaArchive (Data generated at project install time for user objects.) - (Required)
  • storage/spreadsheetTemplates (Data generated at project install time for user objects) - (Required)
  • storage/BasicSyntaxAnalyzer (Required)
  • storage (all other files; for example, a folder with a YYYY naming convention containing auditor logs, etc.)
  • storage/LOC/ (For reprocessing and viewing source data in connection log details, auditor tab, admin console perspective.)

Note: Although optional, if excluded, reprocessing of documents will not function.

WINDOWS TASK SCHEDULER

This backup process uses the Windows Task Scheduler. 

The Clarify Server install folder and Clarify Workspace will be backed up completely.  Here is the list of tasks used for this example.  The order is recommended, but date and time can be whenever is low traffic time for the customer.

Windows Task Scheduler entries for Automating Cleo Clarify Backup


POSTGRE BACKUP

The first step is to back up the Postgres Database the Cleo server uses.  This is done with a Start Program action.  It accesses the Cleo Server Install directory and runs a batch file that Cleo includes in their server installs.

Windows Task Scheduler entry to Back-up Cleo Clarify Postgre database


CLEO SERVER SUSPEND

Next is the task to suspend the Cleo server.  This is done with another Start Program action.  It goes to the Cleo Server Install directory again and runs a different batch file that Cleo includes

Windows Task Scheduler entry to suspend Cleo Clarify Server


CLEO SERVER STOP

Now the Cleo server needs to be stopped once suspended.  Done with another Start Program action.  Going to the same batch file the suspend used.  The command to stop the Cleo Server will be used

Windows Task Scheduler Entry to Stop Cleo Clarify Server


7ZIP BATCH FILE AND SYSTEM RESTART

The next step is a little more complicated.  A third-party program needs to be downloaded to zip your Clarify Server installation and workspace directory.

The program 7Zip is used for this example.
https://www.7-zip.org/download.html

A batch file then needs to be created with commands that runs 7Zip to zip the two folders and then move them off system so the server space does not max out.

The following is the batch file and can be named however the customer determines.  This example is called copyzip.bat.  The following is commands inside the file:
@ECHO OFF
SET PATH=%PATH%;C:\Program Files\7-Zip;

REM Replace space in hour with zero if it is less than 10
SET hr=%time:~0,2%
IF %hr% lss 10 SET hr=0%hr:~1,1%

REM This sets the date like this: mm-dd-yr
Set TODAY=%date:~4,2%-%date:~7,2%-%date:~10,4%

REM Use 7zip to zip files in workspace folder and place in zip archive
ECHO.
ECHO Zipping all files in EBI43_Server and EBI4_Runtime_Workspace and moving to archive D:\EBICustom\CleoSystemFolderBackups\
ECHO.
7z a -tzip “D:\EBICustom\CleoSystemFolderBackups\EBI43_Server\EBI4_Server_%TODAY%.zip” “D:\EBI43_Server" -mx5

ECHO.
7z a -tzip "D:\EBICustom\CleoSystemFolderBackups\EBI4_Runtime_Workspace\EBI4_Workspace_%TODAY%.zip” “D:\EBICustom\EBI4_Runtime_Workspace" -mx5
ECHO.
move /Y "D:\EBICustom\CleoSystemFolderBackups\EBI4_Runtime_Workspace\*.zip” “\<OtherMachine>\Extol_Backups\Test\CleoSystemFolderBackups\EBI4_Runtime_Workspace"
ECHO.
move /Y "D:\EBICustom\CleoSystemFolderBackups\EBI43_Server\*.zip” “\<OtherMachine>\Extol_Backups\Test\CleoSystemFolderBackups\EBI43_Server"
ECHO.
C:\Windows\System32\shutdown -r

Windows Task Scheduler entry to copy zip file for Automating Cleo Clarify Backup


Once you have set up the batch file.  Place it in a directory where it can be referenced for another Start Program action.


RESUME CLEO SERVER

The last task runs when the system starts back up.  It is delayed running 5 minutes to give the system time to get up and running.  It uses the same batch file the server suspend and stop use.

Windows Task Scheduler Entry to Resume Cleo Clarify Server


By: on