Manual Collector Upgrade with Roll-Back - Best Practice

 

 

When manually upgrading the Vyopta Data Collector there are some simple steps that can be taken in order to ensure that the upgrade goes smoothly and that a roll-back is possible. 

In this way, any dependencies, updates and patches will have no impact on the upgrade itself, since it will be self-contained, and the previous version will be preserved. 

 

Windows Linux

Proposed Directory Structure.

The above can be achieved by ensuring that new and old installations are held in separate directories. Consider the following typical Windows installation 

C:\VyoptaCollector
├── .cache
├── .drivers
├── .jre
├── .libs
├── License.txt
├── .logs
├── .patches
├── .resources
├── .shadow
├── vyoptacollector.exe
└── vyoptacollector.xml

Here the collector is installed under C:\VyoptaCollector, with all of the files present under the same directory.

What is proposed is that the installation directory structure should have an extra level that corresponds to the version being installed:-

C:\VyoptaCollector
├── 4.7
│   ├── .cache
│   ├── .drivers
│   ├── .jre
│   ├── .libs
│   ├── License.txt
│   ├── .logs
│   ├── .patches
│   ├── .resources
│   ├── .shadow
│   ├── vyoptacollector.exe
│   └── vyoptacollector.xml

Installing to the new structure

If the structure above is already present on your system, then performing the upgrade in the safest way can be achieved by the following steps 

  • Create a new directory (in this case 4.8) under the existing tree 
  • Copy the vyoptacollector.xml file into the 4.8 directory
  • Place the new installer into the 4.8 directory

Your directory tree will now resemble

C:\VyoptaCollector
├── 4.7
│   ├── .cache
│   ├── .drivers
│   ├── .jre
│   ├── .libs
│   ├── License.txt
│   ├── .logs
│   ├── .patches
│   ├── .resources
│   ├── .shadow
│   ├── vyoptacollector.exe
│   └── vyoptacollector.xml
├── 4.8
│   ├── vyoptacollector.exe
│   └── vyoptacollector.xml

You are now ready to perform the upgrade:

  • Stop the Vyopta CPM Data Collector service
  • At an administrative command prompt in the old installation directories (4.7 in the above) run the command
vyoptacollector.exe -uninstall
  • At an administrative command prompt in the new installation directories (4.8 in the above) run the command
vyoptacollector.exe -install

The roll-back is a matter of performing the same steps with the installation and uninstallation reversed. 

If the structure is not already present on your system, then please proceed as follows

Create a 4.7 directory under your current installation. Into this directory place the vyoptacollector.xml and the new collector executable. 

Create a directory for your old version (assuming 4.7 in this example)

C:\VyoptaCollector
├── .cache
├── .drivers
├── .jre
├── .libs
├── License.txt
├── .logs
├── .patches
├── .resources
├── .shadow
├── vyoptacollector.exe
└── vyoptacollector.xml
├── 4.7
├── 4.8
│   ├── vyoptacollector.exe
│   └── vyoptacollector.xml
  • Stop the Vyopta CPM Data Collector service
  • At an administrative command prompt in the old installation directories (C:\VyoptaCollector in the above example) run the command
vyoptacollector.exe -uninstall
  • At an administrative command prompt in the new installation directories (4.8 in the above) run the command
vyoptacollector.exe -install
  • Move all remaining files and directories (except the new folder (4.8) into the old (4.7) folder

The rollback procedure will be to uninstall from the new folder and install from the old with the service stopped. 

Cleaning up

Once the upgrade has taken place the folders highlighted in the the old (4.7) file tree can safely  be removed without hindering rollback.

C:\VyoptaCollector
├── 4.7
│   ├── .cache
│   ├── .drivers
│   ├── .jre
│   ├── .libs
│   ├── License.txt
│   ├── .logs
│   ├── .patches
│   ├── .resources
│   ├── .shadow
│   ├── vyoptacollector.exe
│   └── vyoptacollector.xml
├── 4.8
│   ├── .cache
│   ├── .drivers
│   ├── .jre
│   ├── .libs
│   ├── License.txt
│   ├── .logs
│   ├── .resources
│   ├── .shadow
│   ├── vyoptacollector.exe
│   └── vyoptacollector.xml

When it is certain that the previous version is no longer required, the entire tree for the release may be deleted, leaving only the new version. 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.