MEMSQL-UPGRADE
On this page
Available since MemSQL Ops version 4.
Stop, upgrade, and restart all SingleStoreDB nodes in the cluster.
Usage
usage: memsql-ops memsql-upgrade [--settings-file SETTINGS_FILE] [--async][--file-path FILE_PATH | --version VERSION | --version-hash VERSION_HASH][--no-prompt] [--restart-on-rollback][--skip-snapshot] [--skip-version-check][--backup-data-directories | --no-backup-data-directories][--stop-timeout STOP_TIMEOUT]Stop, upgrade, and restart all SingleStoreDB nodes in the cluster.optional arguments:--settings-file SETTINGS_FILEA path to a MemSQL Ops settings.conf file. If not set,we will use the file in the same directory as theMemSQL Ops binary.--async If this option is true, we will exit without waitingfor the cluster to be fully upgraded.--file-path FILE_PATHA .tar.gz file that contains a SingleStoreDB binary to useduring the upgrade.--version VERSION The SingleStoreDB version to which all nodes will be upgraded(e.g. 7.1). If this is not set, we will attempt toupgrade all nodes to the latest available SingleStoreDBversion.--version-hash VERSION_HASHA SingleStoreDB version hash to use.--no-prompt If this option is specified, we will upgrade thecluster without prompting. We will also assume--backup-data-directories is set to true unlessotherwise specified.--restart-on-rollbackIn the event of an upgrade failure and rollback,restart the cluster. The default behavior without thisflag is to leave the rolled-back cluster in a stoppedstate.--skip-snapshot Do not run SNAPSHOT on all the databases in thecluster before upgrading. This may cause the upgradeto take longer.--skip-start Do not start the cluster after upgrade.--skip-version-check Do not check that the SingleStoreDB version specified ishigher than the installed SingleStoreDB version. This flagonly applies to maintenance release upgrades.--backup-data-directoriesBackup data directories during the upgrade. If boththis and --no-backup-data-directories are notspecified, we will prompt before the upgrade.--no-backup-data-directoriesDo not backup data directories during the upgrade.Specifying this option will result in faster upgradesand will use less disk space during the upgrade at therisk of data loss. If both this and --backup-data-directories are not specified, we will prompt beforethe upgrade.--stop-timeout STOP_TIMEOUTNumber of seconds to wait for the SingleStoreDB nodes tostop. The default is 120 seconds.
Remarks
It is important to understand that an upgrade with memsql-ops memsql-upgrade
installs a new version of SingleStoreDB to a different path instead of overwriting the existing installation.memsql_
– a string that is created each time SingleStoreDB is updated or installed – to the end of the installation directory name.master-3306-FMGUB04J8R
instead of master-3306
.master-3306-FMGUB04J8R
).
By using a different directory to upgrade, the installation process can be safely rolled back, since the upgrade process does not modify any of the files in the older version’s directory.
The —skip-start
flag is useful for preventing rollback of upgrades if a cluster takes a long time (eg.
Any custom scripts using a hardcoded path to the SingleStoreDB installation directory should be updated to reflect the change of the installation directory caused by the upgrade, or, ideally, should use the memsql-path
command instead of a hardcoded path.
Last modified: April 25, 2023