When a new virtual instance of InCenter is created, perhaps because a new InCenter version has been installed, there may be a need to transfer the old log data to the new instance. This is achieved using the following steps:
Find out the total disk space used by the old log data by running the following InCenter CLI command:
admin@InCenter:/> log -status
Make sure that at least this amount of disk space is available for the new InCenter instance.
In the host operating system for the old InCenter instance, run the script backupLogs.sh which can be found in the scripts folder. This will save the old log data to a specific folder. For example:
$ ./backupLogs.sh /mnt/cloudBackup/opensearch
Note that an absolute path must be specified as the script parameter in the above command. If this is not done then it can lead to OpenSearch being unable to start. The same problem could occur if the backup script is terminated before it completes.
In the host operating system of the new instance, restore the saved log data in the folder by running the script restoreLogs.sh. For example:
$ ./restoreLogs.sh /mnt/cloudBackup/opensearch
Note that when either backupLogs.sh or restoreLogs.sh runs, InCenter will not be able to receive log messages for a period of time.
The new InCenter instance will now have all the old log data available to it.