IMPORTANT: It is advised to update to 22.3.0 so the customer have the capability of doing a backup, then proceed with the update to the version which uses elastic search.
Prefix: It is not advised to revert back to a version using Apache Solr unless necessary. It is safer to do a fresh install if possible.
WARNING: You must revert back to the SAME EXACT VERSION this is due to the fact that enterprise-holodeck has the same front-end files for that version!
WINDOW:
1.) Stop services before proceeding.
net stop enterprise-apache
net stop enterprise-elasticsearch
net stop enterprise-datarolloff
net stop enterprise-sendemail
net stop enterprise-importer
net stop enterprise-webservice
2.) Remove Elasticsearch.
In PS cd “C:\Program Files\exacqVision\EnterpriseManager\elasticsearch\bin\”
PS C:\Program Files\exacqVision\EnterpriseManager\elasticsearch\bin> Type: .\elasticsearch-service-enterprise-remove.bat
WARNING: CHECK THAT THE SERVICE ‘enterprise-elasticsearch’ HAS BEEN REMOVED BEFORE PROCEEDING.**
PS Type:
Get-Service -Name enterprise-elasticsearch
You should see output ‘Get-Service : Cannot find any service with service name ‘enterprise-elasticsearch’.’.
cd “C:\Program Files\exacqVision\EnterpriseManager”
PS C:\Program Files\exacqVision\EnterpriseManager> rm elasticsearch
3.) Uninstall Apache.
In PowerShell as admin go to:
C:\Program Files\exacqVision\EnterpriseManager\apache\bin>
Type: .\httpd.exe -k uninstall -n enterprise-apache
Check that the service ‘enterprise-apache’ has been removed before proceeding.
4.) Backup Apache.
In PowerShell go to:
C:\Program Files\exacqVision\EnterpriseManager>
Type: mv apache ..\es_apache.old
5.) Revert MediaRoot and StaticRoot with the following.
In PowerShell CD into .\EnterpriseSystemManger\
Type: .\installer.exe decrypt
To edit the file with notepad run the following commands:
From EnerpriseSystemManger Type:
notepad.exe EnerpriseSystemManger.tmp
You will see something similar in notepad at first.
ONLY CHANGE THE FOLLOWING ITEMS with a text editor.
WARNING: Make sure the paths MATCH EXACTLY including forward and backward slashes MediaRoot=C:\Program Files\exacqVision\EnterpriseManager/apache_solr/apache2/htdocs/media
StaticRoot=C:\Program Files\exacqVision\EnterpriseManager/apache_solr/apache2/htdocs/static.
Example:
In Power Shell Type
.\installer.exe encrypt
Now Type:
del EnterpriseSystemManager.tmp
6.) Rename apache_solr-<timestamp>.old.
In PowerShell as Admin go to:
C:\Program Files\exacqVision\EnterpriseManager>
Type: Rename-Item .\apache_solr-20220405160617.old\ .\apache_solr
7.) Remove EM_Documentation.txt.
CD into C:\Program Files\exacqVision\EnterpriseManager>
Type: del.\EM_Documentation.txt
8.) Run an update to the old version.
IMPORTANT: At this point we will run the SAME EXACT VERSION of the installer we migrated from!
WARNING: Make sure folders, shells, notepad.exe etc. are closed that are referencing anything inside the EM install directory!
WARNING: You must NOT have an ‘apache_solr.old’ folder in the directory. CRITICAL: Run the installer outside of EM when prompted YOU MUST CHECK optional update ‘Apache Solr 7.5.0’ !
9.) Restore all htdocs installers.
PowerShell into:
cd “C:\Program Files\exacqVision”
PS C:\Program Files\exacqVision> cp .\es_apache.old\htdocs\media\installers\*.exe .\EnterpriseManager\apache_solr\apache2\htdocs\media\installers\
Note: This will load the files from step 4. to make sure everything matches.
10.) Clean up firewall rules.
Delete inbound firewall rule with name ‘exacqVision Enterprise Manager Apache’.
11.) Confirm downgrade is functional.
a.) Navigate to 127.0.0.1:8983 it should open up Apache Solr management portal.
b.) Confirm the following rules exist.
solrApache
solrJetty
c.) Navigate to {EM_HOST}:{EM_PORT} and login to EM.
12.) Load domain users into Apache Solr.
Navigate to {EM_HOST}:{EM_PORT} and login to EM.
Go to the sidebar and click ‘Domain’.
If a domain is being used click ‘refresh now’ this will load domain users back into Apache Solr.
LINUX:
RESTORE ELASTICSEARCH -> APACHE SOLR (Ubuntu):
Prefix: It is not advised to revert back to a version using Apache Solr unless necessary.
WARNING: You must revert back to the SAME EXACT VERSION this is due to the fact that enterprise-holodeck has the same front-end for that version!
1.) Stop services before proceeding.
sudo systemctl stop enterprise-elasticsearch
sudo systemctl stop enterprise-datarolloff
sudo systemctl stop enterprise-sendemail
sudo systemctl stop enterprise-importer
sudo systemctl stop enterprise-webservice
Note: Stopping enterprise-webservice will also stop the Apache service as well.
2.) Remove Elasticsearch.
sudo update-rc.d enterprise-elasticsearch remove
sudo rm /etc/init.d/enterprise-elasticsearch
exacqu@ubuntu:/usr/local/exacq/esm$ sudo rm -rf ./elasticsearch
3.) Backup Apache.
Note: Apache in Ubuntu does not have any files configured outside of the Apache directory.
Create a manual backup of Apache for later and move it outside of the esm directory.
sudo mv /usr/local/exacq/esm/apache /usr/local/exacq/es_apache.old
4.) Reload services for systemctl.
sudo systemctl daemon-reload
sudo systemctl status enterprise-elasticsearch
You should see output ‘Unit enterprise-elasticsearch.service could not be found’.
5.) Revert MediaRoot and StaticRoot.
cd /usr/local/exacq/esm
exacqu@ubuntu:/usr/local/exacq/esm$ ./installer decrypt
exacqu@ubuntu:/usr/local/exacq/esm$ sudo gedit EnterpriseSystemManager.tmp
WARNING: Make sure the paths use forward slashes only!
MediaRoot=/usr/local/exacq/esm/apache_solr/apache2/htdocs/media
StaticRoot=/usr/local/exacq/esm/apache_solr/apache2/htdocs/static
exacqu@ubuntu:/usr/local/exacq/esm$ ./installer.exe encrypt
exacqu@ubuntu:/usr/local/exacq/esm$ sudo rm EnterpriseSystemManager.tmp
6.) Rename apache_solr-<timestamp>.old.
cd /usr/local/exacq/esm
exacqu@ubuntu:/usr/local/exacq/esm$ sudo mv apache_solr-<timestamp>.old apache_solr
7.) Run an update to the old version.
IMPORTANT: At this point we will run the SAME EXACT VERSION of the installer we migrated from!
WARNING: You must NOT have an ‘apache_solr.old’ folder in the directory.
CRITICAL: The installer MUST NOT BE run in silent mode since silent mode WILL NOT PROMPT for the optional updates!
CRITICAL: Run the installer outside of EM when prompted YOU MUST CHECK optional update ‘Apache Solr 7.5.0’!
sudo dpkg -i exacqVisionEnterpriseManager_XX.XX.X_x64.deb
8.) Restore all htdocs installers.
sudo cp /usr/local/exacq/es_apache.old/htdocs/media/installers/*.deb /usr/local/exacq/esm/apache_solr/apache2/media/installers/
9.) Confirm downgrade is functional.
a.) Navigate to 127.0.0.1:8983 it should open up Apache Solr management portal.
b.) Firewall rules must be applied for Apache Solr management portal.
sudo iptables -S
Confirm the following rules exist:
-A INPUT -s 127.0.0.1/32 -p tcp -m tcp –dport 8983 -j ACCEPT
-A INPUT -p tcp -m tcp –dport 8983 -j DROP
c.) Navigate to {EM_HOST}:{EM_PORT} and login to EM.
10.) Load domain users into Apache Solr.
Navigate to {EM_HOST}:{EM_PORT} and login to EM.
Go to the sidebar and click ‘Domain’.
If a domain is being used click ‘refresh now’ this will load domain users back into Apache Solr.