Earlier in the day Dyuti messaged me. He was facing problems that did not exist before after he upgraded to Koha 16.05 from 3.22 on his production system. What he reported sounded like a bug, so I asked him to report it on the Koha bugzilla. Thankfully, he had remembered to take a database backup of his Koha instance before the upgrade. He wanted to know if there was any way he could go back to 3.22 using the backup where things were working fine (as far as the functions he required).
This is a fairly common scenario. People upgrading to the new stable after a major version release, often wish that they can *downgrade* to their earlier major version release, especially after realizing that something is broken in the new major version that used to work for them in the earlier one. If they could do that, then they could wait until the bug fix became available, without any interruption in the library service.
Luckily with Koha this is quite easy, especially if you were on the immediate previous version.
(HINT! one more reason why you should try to keep your Koha instance updated if you do not have a dedicated IT team to support you).
Taking Dyuti’s case as an example use-case, here are the steps to go back to 3.22 from 16.05:
- Using the terminal, take a backup of
koha_librarydatabase, preferably using
koha-run-backups(click to reference details) and keep the backup safe.
sudo apt-get purge koha-commoncommand to remove Koha ILS from the system.
- Remove the existing
koha_librarydatabase from MySQL.
- Re-install earlier major version series (3.22 in this case) of Koha using the
oldstablerepo. The change has to be made in your
koha.listfile (see here for explanation).
- Run the
sudo koha-create --create-db librarycommand to recreate your Koha instance.
- Import the old 3.22 backup into the newly created
- Access the Koha staff client using the new database user id and password from the newly recreated
koha-conf.xml, and let the web installer run its course.
- Switch to a terminal and run
sudo koha-rebuild-zebra -v -f libraryto update your zebra indexes.
You should be good to go! Enjoy!
NOTE 1: Dyuti’s Koha database is named ‘koha_library‘. However your’s may be named differently, so remember to substitute your own db name here.
NOTE 2: These instructions are meant for a package based Koha installation either on Debian or Ubuntu as outlined in the Koha Community Wiki. If you are running a tarball or git based installation you probably already know what to do. 😀