Can Spectrum be configured to create multiple backup copies of output files?

Document ID : KB000117117
Last Modified Date : 08/10/2018
Show Technical Document Details
Introduction:
By default, the SpectroSERVER will create a VNM.OUT and VNM.OUT.bak file and the Archive Manager will create an ARCHMGR.OUT and ARCHMGR.OUT.bak file. In both instances, the ".OUT" file will be the current output file being written to and the ".OUT.bak" file will be the previous output file written to. If the process is restarted, the previous ".OUT" file will be written to ".OUT.bak" overwriting the current ".OUT.bak" file.
Question:
Can Spectrum be configured to create multiple backup copies of output files?
Answer:

Starting in Spectrum 10.02.02.00, you can configure the Spectrum processes to create multiple copies of the backup files. This is done using the "LOGBACKUPMAX" parameter in the associated "idb" file located in the $SPECROOT/lib/SDPM/partslist directory.

For example, the $SPECROOT/lib/SDPM/pertslist/SS.idb file for Spectrum 10.02.02.00 and greater looks like the following out of the box

# Processd Install Ticket for SpectroSERVER Daemon.
PARTNAME;SS;
APPNAME;SpectroSERVER Daemon;
WORKPATH;$SPECROOT/SS;
LOGNAMEPATH;$WORKPATH/VNM.OUT;
LOGBACKUPMAX;10;
ADMINPRIVS;y;
#AUTORESTART;N;
#AUTOBOOTSTART;N;
STATEBASED;y;
NUMPROCS;3; // unlimited
RETRYTIMEOUT;0; // seconds
#TICKETUSER;ackjo04;
RETRYMAX;0;     // retries
STARTPRIORITY;20;
SERVERPROCESS;Y;
#ENV;<var>=<value>;
ARGV;$SPECROOT/SS/SpectroSERVER<CSEXE>; //

The "LOGBACKUPMAX;10;" above tells Spectrum to retain 10 copies of the $SPECROOT/SS/VNM.OUT files. The backup files will be date/time stamped when saved. For example:

-rw-r--r-- 1 spectrum spectrum 1914 Oct  8 09:09 VNM.OUT
-rw-r--r-- 1 spectrum spectrum 2789 Sep 11 13:38 VNM.OUT.bak.20180911135608
-rw-r--r-- 1 spectrum spectrum 3352 Sep 26 16:32 VNM.OUT.bak.20180926163639
-rw-r--r-- 1 spectrum spectrum 2789 Sep 27 12:34 VNM.OUT.bak.20180927123429
-rw-r--r-- 1 spectrum spectrum 2840 Oct  5 15:27 VNM.OUT.bak.20181005152805
-rw-rw---- 1 spectrum spectrum 2835 Oct  5 16:38 VNM.OUT.bak.20181005163939
-rw-rw---- 1 spectrum spectrum 2835 Oct  5 17:32 VNM.OUT.bak.20181005173321
-rw-rw---- 1 spectrum spectrum 2835 Oct  5 17:38 VNM.OUT.bak.20181005173827
-rw-rw---- 1 spectrum spectrum 2837 Oct  5 17:54 VNM.OUT.bak.20181005175753
-rw-rw---- 1 spectrum spectrum 2921 Oct  7 03:37 VNM.OUT.bak.20181008090748

Out of the box, only the SS.idb and ARCHMGR.idb files have the LOGBACKUPMAX parameter set. However, you can add the LOGBACKUPMAX to any idb file you wish. For example, the ALARMNOTIFIER.idb.

NOTE: idb files on Linux and Solaris can only be modified by the root user

NOTE: After making changes to an idb file, processd must be restarted for the change to take affect. DO NOT shutdown and then start processd as this will cause the Spectrum processes to shutdown as well. Issue "restart" to the processd process which will restart processd but not stop any of the processes managed by processd.
 

To restart processd:

Windows:
1. Log into the Windows system as the user that owns the Spectrum installation
2. Start a bash shell by running "bash -login"
3. cd the the $SPECROOT/lib/SDPM directory and enter the following command:

./processd.exe --restart

Linux and Solaris:
1. Login or su to the root user
2. cd to the $SPECROOT/lib/SDPM directory and enter the following command:

./processd.pl restart