Upgrading LedgerSMB 1.8.x to 1.8.y

Submitted by ehu on

There are two steps to upgrading a LedgerSMB 1.8.x installation to 1.8.y (x smaller than y):

  1. Upgrade the software
  2. Upgrade the company database

The second step has to be executed for each company database that's set up.

Upgrade the software

The steps to upgrade the software differ between Docker or tarball (from source) installations.

Upgrading Docker installations

In case the installation was created using the docker-compose infrastructure provided by the project, the upgrade should be as simple as running

$ docker-compose pull
$ docker-compose up -d

in the directory where you initially ran the "docker-compose up -d" command. The above commands should produce this output:

Recreating ledgersmb-docker_postgres_1 ... done
Recreating ledgersmb-docker_lsmb_1     ... done

Note that the "ledgersmb-docker" prefix may differ, depending on the name of the directory your docker-compose.yml file is stored in (in this case it was called "ledgersmb-docker/").

Upgrading tarball installations

Note that all the steps below are prefixed with the 'sudo' command, but these can be executed as 'root' directly as well.

# Stop the LedgerSMB application server (e.g. Starman)
$ sudo service starman-ledgersmb stop
 
# Back up the old software by moving it out of the way (assuming you installed in /usr/local/ledgersmb):
$ sudo mv /usr/local/ledgersmb /usr/local/ledgersmb.backup
 
# Untar the tarball into /usr/local/ledgersmb:
$ sudo tar xf ledgersmb-1.6.y.tar.gz --directory /usr/local
 
# Copy the configuration file from the old installation:
$ sudo cp /usr/local/ledgersmb.backup/ledgersmb.conf /usr/local/ledgersmb/
 
# Start the LedgerSMB application server again (Starman example given, as before):
$ sudo service starman-ledgersmb start

Upgrading the company database

After the software has been upgraded, the company database(s) have to be upgraded. When a user logs in on a database which is of a version different from the software that's used to access the database, a "Database version mismatch" error will be generated.

To upgrade the company database from the Web UI, navigate to the setup.pl page (e.g. when you're hosting your LedgerSMB on https://localhost/ and normally log in through https://localhost/login.pl, now you need to navigate to https://localhost/setup.pl). Log into setup.pl with the database admin credentials (the "lsmb_dbadmin" user, if you followed the installation instructions).

After login, setup.pl will show a sccreen with the following at the top:

 

Logged in as lsmb_dbadmin
LedgerSMB 1.8 db found
Rebuild/Upgrade?

By clicking the "Yes" button, the company database upgrade process will be executed.

Repeat this process for all company databases.

Release
FAQ Category