This text describes how to upgrade from Stager 4.0 to 4.1

This release of Stager drastically changes the way bookmarks are created,
stored, and processed for viewing. It also adds the ability to create new
report types on the fly (Custom reports).

Lines prefixed with '$' are commands intended to be executed from a shell.

Upgrade backend: 
$ ./stager-install.pl --type=backend --backends=netflow_nfdump --path=/installation/path/

If you installed the backend to the same location as Stager 4.0 the
configuration file will not have been updated. This means that by default,
Stager assumes you are using nfdump 1.5.x.  
If you want to use nfdump 1.6: 
    Edit file: <backend>/etc/netflow_nfdump.cfg 
        add the value 'nfdump_version' => 'nfdump16'

If you installed the backend to a new location, Stager 4.1 should already have
the configuration value correct, and set to 'nfdump16'. 
If you want to keep using nfdump 1.5.x, simply change the configuration value 
to 'nfdump15'.

Upgrade database: 
$ cd /installation/path/bin 
$ psql <stager DB> < ../var/sql/upgrade.sql

WARNING: Old bookmarks WILL seize to function after an upgrade to 4.1. They
will still appear in the list of bookmarks, but viewing them will not be
possible.  To remove the old bookmarks either delete them manually from the
frontend or run the command:

$ echo "DELETE FROM Bookmarks;" | psql <stager DB>

Upgrade frontend: $ ./stager-install.pl --type=frontend --backends=netflow_nfdump --path=/installation/path/

Edit file: config/user.config.php 
    after the line: 
        'source'  => '....', 
    add:
        'setuppage'	=> 'setup.netflow.tpl',

For 'Custom reports' to work properly, make sure you have YUI >= 2.7 installed:
$ cd <frontend path>/javascript 
$ wget http://yuilibrary.com/downloads/yui2/yui_2.8.1.zip 
$ unzip yui_2.8.1.zip  

You will have to delete cookies from the old system in your webbrowser for the
new system to function.
