Version Upgrade
Upgrading your SQreamDB version requires stopping all running services.
Stop all actively running SQreamDB services.
Ensuring that SQreamDB services are at a halt depends on the tool being used.
Verify that SQreamDB has stopped listening on ports 500X, 510X, and 310X:
$ sudo netstat -nltp #to make sure SQreamDB stopped listening on 500X, 510X and 310X ports.
Replace the old SQreamDB version with the new version, such as in the following example:
$ cd /home/sqream
$ mkdir tempfolder
$ mv sqream-db-v2021.1.tar.gz tempfolder/
$ cd tempfolder/
$ tar -xf sqream-db-v2021.1.tar.gz
$ sudo mv sqream /usr/local/sqream-db-v2021.1
$ cd /usr/local
$ sudo chown -R sqream:sqream sqream-db-v2021.1
Remove the symbolic link:
$ sudo rm sqream
Create a new symbolic link named “sqream” pointing to the new version:
$ sudo ln -s sqream-db-v2021.1 sqream
Verify that the symbolic SQreamDB link points to the real folder:
$ ls -l
-- Output example:
$ sqream -> sqream-db-v2021.1
Upgrade your version of SQreamDB storage.
SQreamDB recommends storing the generated back-up locally in case needed. To generate a back-up of the metadata, run the following command:
$ select backup_metadata('out_path');SQreamDB runs the Garbage Collector and creates a clean backup tarball package.
Shut down all SQreamDB services.
Extract the recently created back-up file.
Replace your current metadata with the metadata you stored in the back-up file.
Navigate to the new SQreamDB package bin folder.
Get the cluster path
$ cat /etc/sqream/sqream1_config.json |grep cluster
Run the following command:
$ ./upgrade_storage <RocksDB path> -- Output example: get_leveldb_version path{<cluster path>} current storage version 23 upgrade_v24 upgrade_storage to 24 upgrade_storage to 24 - Done upgrade_v25 upgrade_storage to 25 upgrade_storage to 25 - Done upgrade_v26 upgrade_storage to 26 upgrade_storage to 26 - Done validate_leveldb ... upgrade_v37 upgrade_storage to 37 upgrade_storage to 37 - Done validate_leveldb storage has been upgraded successfully to version 37
Verify that the latest version has been installed:
$ ./sqream sql --username sqream --password sqream --host localhost --databasename master -c "SELECT SHOW_VERSION();"
-- Output example:
v2021.1
1 row
time: 0.050603s
For more information, see the upgrade_storage command line program.
After completing the upgrade process, ensure that ALL operational and configuration changes introduced in versions newer than the version you are upgrading from are applied before returning to regular SQreamDB operations.