Skip to content

Upgrading SlashDB 1.5.x to 1.6.x

Before upgrading, make sure you have a valid license key for version 1.6.x

Note that SlashDB 1.6.x supports Python versions 3.7 - 3.9

You have two options to perform the upgrade:

  • Installing 1.6.x over an existing 1.5.x installation
    • can be faster for upgrading existing hosts
    • manual edits of certain configuration files may be required
  • Installing 1.6.x on a new system and copying the config files from the existing installation
    • best for creating a new "golden image" or new client instance
    • avoids stale components or application files whose locations might have changed
    • reduces downtime
    • does not affect production service in case any issues are encountered during the installation

Installing Over Existing Installation

Create a snapshot image of the existing instance in case something goes wrong and the instance needs to be restored quickly.

Download the 1.6.x installer package: * RPM https://downloads.slashdb.com/versions/1.6.47/slashdb-1.6.47.x86_64.rpm * DEB https://downloads.slashdb.com/versions/1.6.47/slashdb_1.6.47_amd64.deb

(these links are for SlashDB v1.6.47. Replace 47 in the link with the specific 1.6 subversion you want to download)

Red Hat Linux/RPM upgrade

cd /tmp
wget https://downloads.slashdb.com/versions/1.6.47/slashdb-1.6.47.x86_64.rpm
sudo su
yum upgrade ./slashdb-1.6.47.x86_64.rpm

Ubuntu/Debian/DEB upgrade

cd /tmp
wget https://downloads.slashdb.com/versions/1.6.47/slashdb_1.6.47_amd64.deb
sudo su
apt-get --only-upgrade install ./slashdb_1.6.47_amd64.deb

Immediately after upgrading with the 1.6.x package, SlashDB will automatically start and use the existing configuration files from the v1.5.x instance.

The new instance will be in initial setup mode, which requires visiting the web UI and going through the welcome wizard:

  • providing license details
  • accepting terms & conditions
  • setting the admin password

Alternatively, this can be done in the backend. After upgrading with the new package:

  • remove file /etc/slashdb/regular-initial
  • enter a valid license in the file /etc/slashdb/license.key. The original license that was used in the 1.5.x deployment is backed up to a file with a datetime stamp in it e.g. license-202208241610.key.
  • the configuration files below are automatically updated (there should be no need to edit these):
    • /etc/slashdb/users.cfg
    • /etc/slashdb/databases.cfg
    • /etc/slashdb/querydefs.cfg
    • /etc/slashdb/auth.cfg
  • the configuration files below may require manual review and editing:

    • /etc/slashdb/slashdb.ini
    • /etc/slashdb/nginx.conf and
    • files in /etc/slashdb/sites-available and /et/slashdb/sites-enabled

    These files may be different in the newer version and won't be updated automatically. For these files, if a corresponding file with the suffix .rpmnew exists, then they must be compared using a tool like sdiff and differences resolved manually.

    See below section: INI File differences between 1.5.x and 1.6.x

  • make sure the permissions on files in /etc/slashdb are as follows:

[root@8fc37589d913 /]# ls -l /etc/slashdb/
total 48
-rw-rw---- 1 root    slashdb 2349 Jul 22 11:23 auth.cfg
-rw-rw---- 1 slashdb slashdb  382 Jul 22 11:23 databases.cfg
-rw-rw---- 1 slashdb slashdb  468 Jul 22 11:23 license.key
-rw-r--r-- 1 root    root    4927 Jul 22 11:23 nginx.conf
-rw-rw---- 1 slashdb slashdb 4661 Jul 22 11:23 querydefs.cfg
-rw-r--r-- 1 slashdb slashdb    0 Jul 22 11:23 regular-initial
drwxr-xr-x 2 root    root    4096 Aug 23 12:48 sites-available
drwxr-xr-x 2 root    root    4096 Jul 22 11:23 sites-enabled
-rw-rw---- 1 root    slashdb 6055 Jul 22 11:23 slashdb.ini
-rw-rw---- 1 slashdb slashdb  474 Jul 22 11:23 users.cfg
  • restart the service with command systemctl restart slashdb

Installing On New System and Copying Configuration From Existing Instance

On a new machine:

  • install and configure an Oracle client, following only steps 1-4 from:
  • Oracle for RedHat or CentOS
  • Oracle for Debian or Ubuntu
  • perform normal installation of the v1.6.x package as per the documentation
  • transfer and replace some of the configuration files:

    • make a local backup of the configuration files of the new installation:

    cp -r /etc/slashdb ~/backups/clean-v1.6.x

    This will be needed to resolve differences between v1.5.x and v1.6.x in some of the configuration files.

    • remove the SlashDB configuration directory /etc/slashdb on the new machine:

    rm -r /etc/slashdb

    • copy configuration and sites from backup:

    cp ~/backups/v1.5.x/etc/slashdb /etc/slashdb cp ~/backup/v1.5.x/var/lib/slashdb/sites /var/lib/slashdb

    Important! Don’t copy or overwrite folders /var/lib/slashdb/www and /var/lib/slashdb/templates. These contain web UI files and must match the installed version.

  • enter a license that is valid for version 1.6.x to /etc/slashdb/license.key

  • the configuration files below are automatically updated (there should be no need to edit these):

    • /etc/slashdb/users.cfg
    • /etc/slashdb/databases.cfg
    • /etc/slashdb/querydefs.cfg
    • /etc/slashdb/auth.cfg
  • the configuration files below may require manual review and editing:

    • /etc/slashdb/slashdb.ini
    • /etc/slashdb/nginx.conf and
    • files in /etc/slashdb/sites-available and /et/slashdb/sites-enabled

    These files may be different in the newer version and won't be updated automatically. They must be compared with files in ~/backups/clean-v1.6.x using a tool like sdiff and differences resolved manually.

    See section: INI File Differences Between 1.5.40 and 1.6.47

  • make sure the permissions on files in /etc/slashdb are as follows:

[root@8fc37589d913 /]# ls -l /etc/slashdb/
total 48
-rw-rw---- 1 root    slashdb 2349 Jul 22 11:23 auth.cfg
-rw-rw---- 1 slashdb slashdb  382 Jul 22 11:23 databases.cfg
-rw-rw---- 1 slashdb slashdb  468 Jul 22 11:23 license.key
-rw-r--r-- 1 root    root    4927 Jul 22 11:23 nginx.conf
-rw-rw---- 1 slashdb slashdb 4661 Jul 22 11:23 querydefs.cfg
-rw-r--r-- 1 slashdb slashdb    0 Jul 22 11:23 regular-initial
drwxr-xr-x 2 root    root    4096 Aug 23 12:48 sites-available
drwxr-xr-x 2 root    root    4096 Jul 22 11:23 sites-enabled
-rw-rw---- 1 root    slashdb 6055 Jul 22 11:23 slashdb.ini
-rw-rw---- 1 slashdb slashdb  474 Jul 22 11:23 users.cfg
  • restart SlashDB service systemctl restart slashdb

INI File Differences Between 1.5.x and 1.6.x

In 1.6.47 INI file:

SlashDB Config

Added

+ slashdb_env = /etc/slashdb

slasdhdb_env sets the directory where SlashDB configuration files can be found (default is /etc/slashdb). Can be used as a placeholder for other directory paths.

Changed

- databases_path = /etc/slashdb/databases.cfg
- users_path = /etc/slashdb/users.cfg
- querydefs_path = /etc/slashdb/querydefs.cfg
- initial_state_path = /etc/slashdb/regular-initial
- license = /etc/slashdb/license.key
- auth_config_path = /etc/slashdb/auth.cfg
+ databases_path = %(slashdb_env)s/databases.cfg
+ users_path = %(slashdb_env)s/users.cfg
+ querydefs_path = %(slashdb_env)s/querydefs.cfg
+ initial_state_path = %(slashdb_env)s/regular-initial
+ license = %(slashdb_env)s/license.key
+ auth_config_path = %(slashdb_env)s/auth.cfg

SQLAlchemy Config

Deleted

- sqlalchemy_sdb.use_sqlalchemy_automap
- sqlalchemy_sdb.engine_echo

SQLAlchemy Database Engine Specific Config

Deleted

- sqlalchemy_sdb.db.{database_name}.echo

Logging Config

Added

+ [handler_console_slashdb]
+ class = StreamHandler
+ args = (sys.stderr,)
+ level = NOTSET
+ formatter = slashdb
+ [logger_sqlalchemy_engine]
+ level = INFO
+ handlers =
+ qualname = sqlalchemy.engine
+ propagate = 1
+ [formatter_slashdb]
+ format = %(asctime)-.19s %(created)d%(msecs)03d [sdbapp] [pid: %(process)d %(processName)s %(threadName)s] %(levelname)-5.5s %(name)s %(module)s:%(funcName)s:%(lineno)d [%(user_id)s] %(message)s

Deleted

- [handler_mail_exc_handler]
- class = handlers.SMTPHandler
- args = (('smtp.host.com', 25), 'from@email.com', ['to@email.com'], 'SlashDB Error', ('smtp_login', 'smtp_password'))
- level = ERROR
- formatter = exc_formatter
- [handler_filelog]
- class = handlers.RotatingFileHandler
- args = ('/var/log/slashdb/slashdb.log','a', 2*1024*1024, 5, 'utf-8')
- level = NOTSET
- formatter = generic
-[logger_sqlalchemy_echo]
- level = INFO
- handlers =
- qualname = sqlalchemy.engine
- propagate = 1

Changed

[handlers]

- keys = console, filelog, exc_handler, mail_exc_handler
+ keys = console, console_slashdb, exc_handler

[formatters]

- keys = generic, exc_formatter
+ keys = generic, exc_formatter, slashdb

[logger_slashdb]

- handlers =
- propagate = 1
+ handlers = console_slashdb
+ propagate = 0

[logger_exc_logger]

- propagate = 0
+ propagate = 1

[handler_exc_handler]

- args = ('/var/log/slashdb/exceptions.log','a', 2*1024*1024, 5, 'utf-8')
+ log_file = exceptions.log
+ args = ("/var/log/slashdb/%(log_file)s",'a', 2*1024*1024, 5, 'utf-8')

[formatter_generic]

- format = %(asctime)-.19s %(created)d%(msecs)03d [sdbapp] [pid: %(process)d %(processName)s %(threadName)s] %(levelname)-5.5s %(name)s %(module)s:%(funcName)s:%(lineno)d %(message)s
+ format = %(asctime)-.19s %(created)d%(msecs)03d [sdbapp] [pid: %(process)d %(processName)s %(threadName)s] %(levelname)-5.5s %(name)s %(module)s:%(funcName)s:%(lineno)d [] %(message)s

[uwsgi]

- listen = 0
+ listen = 100