Skip to content

How to upgrade PellMon

Anders Nylund edited this page May 13, 2016 · 14 revisions

Upgrade to a new version of the binary package (deb file)

If you previously have installed a binary package (deb fil), upgrading is really simple. Just download the new deb file and install it with sudo gdebi filename.deb, eg. sudo gdebi pellmon_0.7.0.beta1-1_all.deb. If you have changed a configuration file (which you probably have), and the same file also has changes in the new version, you will be prompted what to do about it. Just press 'enter' to confirm that you want to keep you own version.

Upgrade from a manual install to the binary package (deb file)

Since version 0.6.1 PellMon is available as a .deb package, which is the recommended way to install. If you have done the manual installation from source code as described in the README, then you must follow this procedure exactly to upgrade to a new version using the packaged .deb file. The debian package is tested on raspbian jessie and ubuntu 14.04. Other distributions might require installing from source. The package does not install on raspbian wheezy.

1. Make a backup copy of the configuration files in /etc/pellmon/

mkdir -p pellmon_conf_backup
cp -r /etc/pellmon/ pellmon_conf_backup/

2. Stop the daemons sudo service pellmonweb stop sudo service pellmonsrv stop

3. Remove the old installation by executing sudo make uninstall from the old source directory, eg. PellMon-master. This must be done, otherwise the old code will be left in place and PellMon will not work at all. If you can't find the source code you used to install you have to download it again and do the autgen.sh and configure steps to be able to uninstall.

4. Move the configuration files back in place:

sudo cp -r pellmon_conf_backup/pellmon/ /etc/

5. Download the debian package from [https://github.com/motoz/PellMon/releases], for instance the v0.6.1 release from [https://github.com/motoz/PellMon/releases/download/v0.6.1/pellmon_0.6.1-1_all.deb]

Install the file with the command:

sudo gdebi pellmon_0.6.1-1_all.deb

if the gdebi command is missing you can install it with: sudo apt-get install gdebi-core

You will be asked if you want to use the package maintainers configuration files or if you want to use your own. You should choose to use your own, which is the default selection so you can press enter for all questions.

PellMon is now upgraded.

If you can't or don't want to use the binary package these are the old instructions:

Upgrade PellMon using source code:

1. Make a backup copy of the configuration files in /etc/pellmon/

mkdir -p pellmon_conf_backup
cp -r /etc/pellmon/ pellmon_conf_backup/

2. Stop the daemons sudo service pellmonweb stop sudo service pellmonsrv stop

3. Remove the old installation by executing sudo make uninstall from the old source directory.

4. Download and unzip the new version (or git pull origin master if you have cloned the repository)

5. Check that you have all dependencies listed in the README file installed, there might be additions.

6. Follow the System Installation section in the README file

7. Open the new configuration files in /etc/pellmon/ and compare them to the saved copy of your configuration. Sometimes quite a lot happens in the configuration file, then it's best to use the new one and transfer your configurations from the backup copy, but when there are no new additions you can just move your copy back in place. In general PellMon should work with your old configuration file without changing it, but there might be new features described in the new configuration file.

You can move back the old configuration (overwriting the new default configuration) from your backup made in step 1 with:

sudo cp -r pellmon_conf_backup/pellmon/ /etc/

Step 3 can most often safely be skipped, it's just to make sure that when an installed file has been renamed/moved/deleted the old one won't be left on the system.

Step 1 is really important, because the new installation will overwrite the old configuration and you don't want to lose that.

The database and event log file won't be touched by a new installation (or removed by uninstall)