You are viewing an older version of this section. View current production version.
Please follow this guide to learn how to migrate to SingleStore tools.
Available since MemSQL Ops version 4.1.8.
Stop, upgrade, and restart all MemSQL nodes in the cluster.
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 MemSQL nodes in the cluster. optional arguments: --settings-file SETTINGS_FILE A path to a MemSQL Ops settings.conf file. If not set, we will use the file in the same directory as the MemSQL Ops binary. --async If this option is true, we will exit without waiting for the cluster to be fully upgraded. --file-path FILE_PATH A .tar.gz file that contains a MemSQL binary to use during the upgrade. --version VERSION The MemSQL version to which all nodes will be upgraded (e.g. 4.0.0). If this is not set, we will attempt to upgrade all nodes to the latest available MemSQL version. --version-hash VERSION_HASH A MemSQL version hash to use. --no-prompt If this option is specified, we will upgrade the cluster without prompting. We will also assume --backup-data-directories is set to true unless otherwise specified. --restart-on-rollback In the event of an upgrade failure and rollback, restart the cluster. The default behavior without this flag is to leave the rolled-back cluster in a stopped state. --skip-snapshot Do not run SNAPSHOT on all the databases in the cluster before upgrading. This may cause the upgrade to take longer. --skip-version-check Do not check that the MemSQL version specified is higher than the installed MemSQL version. This flag only applies to maintenance release upgrades. --backup-data-directories Backup data directories during the upgrade. If both this and --no-backup-data-directories are not specified, we will prompt before the upgrade. --no-backup-data-directories Do not backup data directories during the upgrade. Specifying this option will result in faster upgrades and will use less disk space during the upgrade at the risk of data loss. If both this and --backup-data- directories are not specified, we will prompt before the upgrade. --stop-timeout STOP_TIMEOUT Number of seconds to wait for the MemSQL nodes to stop. The default is 120 seconds.
It is important to understand that an upgrade with
memsql-ops memsql-upgrade installs a new version of MemSQL to a different path instead of overwriting the existing installation. Specifically, MemSQL Ops appends the last 10 digits of the randomly-generated
memsql_install_id – a string that is created each time MemSQL is updated or installed – to the end of the installation directory name. For example:
master-3306-FMGUB04J8R instead of
master-3306. The older installation directory is deleted after a successful upgrade, leaving just the new path (i.e.
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.
Any custom scripts using a hardcoded path to the MemSQL 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. For more information, see MEMSQL-PATH.