Child pages
  • opFlow upgrading to 2.5.x instructions

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

To upgrade from v2 to the latest version V3 please refer to:

Upgrading from opFlow 2.x to 3.x


Table of Contents


opFlow 2.5 no longer uses the age of the records to determine when to delete them.  Records are now limited by the size of the collection, flows and conversations are stored separately so they can have different sizes.  This guarantees that you will never run out of space because a large number of flows came in a short amount of time.


This documentation assumes you are upgrading from 2.4.X and currently have opFlow reports running.

Upgrade files

  1. Decide how big you would like your opFlow data to be (and please read the introduction).  Your best option is to drop the existing database and start fresh.  If you have other Opmantek applications using the existing database, change the db_name in your existing configuration to 'opflow' and remove the opFlow specific collections from the current database (probably 'nmis').  Then run repairDatabase on the existing database to reclaim the space.

  2. Backup your existing installation 

    Code Block
    cd /usr/local
    cp -r opmantek opmantek_backup_`date +%F-%T`
  3. Obtain a copy of the tarball, from now on it will be assumed the file is in /tmp
  4. Stop daemons 

    Code Block
    service opflowd stop
  5. Untar 

    Code Block
    cd /usr/local
    tar -zxvf /tmp/opFlow-Linux-x86_64-2.5.X-release.tar.gz   
  6. Update config files 

    Code Block
    cd /usr/local/opmantek
    ./bin/ install/opFlow.nmis conf/opFlow.nmis
    ./bin/ install/opCommon.nmis conf/opCommon.nmis    
  7. opFlow database now uses capped sizes, please adjust the following config settings to make sure they fit on your partition and are the size you want (the defaults are listed):

    Code Block
    # /usr/local/opmantek/conf/opFlow.nmis:
    'opflow_db_conversation_collection_size' => 16106127360, #15G
    'opflow_db_flow_collection_size' => 5368709120 # 5G

    To see the current sizes or check what the current config will do run the setup tool: 

    Code Block
    /usr/local/opmantek/bin/ setup=db_config

    If you do not want to keep existing data, drop your current database, which will free all space and then skip the next step (7).

  8. When you are happy with the configuration, run the setup tool again with force, this will upgrade your existing collections to capped collections, expanding/shrinking based on the requested size.  Expect this to take a while.

    Code Block
    /usr/local/opmantek/bin/ setup=db_config force=1


    1. Optional: running the setup tool with force, run repairDatabase on mongo to reclaim space, as it will likely be 2x larger than it was previously.  You must have free space = current size of DB to perform this operation. Expect this to take a while.

      Code Block
      use nmis; // (replace with custom db name if you changed from defaults, might be opflow)
      db.auth('opUserRW','op42flow42'); // again, replace with custom credentials if you have changed them from defaults
  9. Fix permissions 

    Code Block
    cd /usr/local/opmantek/bin
  10. Make sure everything is setup: 

    Code Block
    /usr/local/opmantek/bin/ setup=all

    Double check script output for any errors or activities you may need to perform, also double check that the existing cron entries match up with the ones listed by the setup tool.

  11. Start Daemons 

    Code Block
    service opflowd start 


    1. Debian/Ubuntu

      Verify/Edit /etc/init.d/flowd, /etc/init.d/mongod and /etc/init.d/opflowd

      Code Block
      #change this line: 
      . /etc/init.d/functions
      #to this: 
      . /lib/lsb/init-functions