Update Standalone MatrixOne

You can update the standalone MatrixOne version by 3 methods:

Note

This document is only applicable to the v0.5.0 version updating. Not for v0.4.0/v0.3.0/v0.2.0/v0.1.0 update to v0.5.0 version.

Before You Start

  • MatrixOne v0.5.0 has been installed.

Method 1: Updating from source

Scenario Example :

  • The local Matrixone directory needs to be upgraded from v0.5.0 to v0.5.1.

  • The store directory needs to be backed up.

1. Backup store

  1. cd matrixone
  2. ls
  3. cp -r store ${path_name}

${path_name} indicates the backup path of store.

Note

If you’ve never started MatrixOne, you don’t need to do this step.

2. Get the MatrixOne v0.5.1 code

  1. git pull https://github.com/matrixorigin/matrixone.git
  2. git checkout 0.5.1

3. Copy the backed up store directory back to the MatrixOne directory

  1. cp -r ${path_name} store

4. Run make

You can run make debug, make clean, or anything else our Makefile offers.

  1. make config
  2. make build

5. Boot MatrixOne server

  1. ./mo-server system_vars_config.toml

6. Connect to MatrixOne Server

When you finish installing MatrixOne, you can refer to the section below to connect to the MatrixOne server.

See Connect to MatrixOne server.

Method 2: Using binary package to update

Scenario Example :

  • The local Matrixone directory needs to be upgraded from v0.5.0 to v0.5.1.

  • The store directory needs to be backed up.

1. Backup store

  1. cd matrixone
  2. ls
  3. cp -r store ${path_name}

${path_name} indicates the backup path of store.

Note

If you’ve never started MatrixOne, you don’t need to do this step.

2. Download binary packages and decompress

  • Linux Environment
  1. wget https://github.com/matrixorigin/matrixone/releases/download/v0.5.0/mo-server-v0.5.1-linux-amd64.zip
  2. unzip mo-server-v0.5.1-linux-amd64.zip
  • MacOS Environment
  1. wget https://github.com/matrixorigin/matrixone/releases/download/v0.5.0/mo-server-v0.5.1-darwin-x86_64.zip
  2. unzip mo-server-v0.5.1-darwin-x86_64.zip

3. Cover mo-server (Optional)

  • If you are download the v0.5.1 binary package to a new path (for example, the new path is 0.5.1_path), then you only need to use the mo-server in the v0.5.1 binary package to overwrite the mo-server in the v0.5.0 binary package.
  1. cp -rf 0.5.1_path/matrixone/mo-server matrixone/mo-server
  • If you download the V0.5.1 binary package to the current Matxione path, then the mo-server will be automatically covered, and you don’t need to do anything else.

4. Copy the backed up store directory back to the MatrixOne directory

  1. cp -r ${path_name} store

5. Launch MatrixOne server

  1. ./mo-server system_vars_config.toml

6. Connect to MatrixOne Server

When you finish installing MatrixOne, you can refer to the section below to connect to the MatrixOne server.

See Connect to MatrixOne server.

Method 3: Using Docker to update

If you do not need to keep historical data, you can use the following command to download an image of MatrixOne V0.5.1 from Docker Hub.

  1. docker ps
  2. docker stop matrixone
  3. docker rm matrixone
  4. docker pull matrixorigin/matrixone:0.5.1
  5. docker run -d -p 6001:6001 --name matrixone matrixorigin/matrixone:0.5.1

If you need to keep historical data, please refer to the following scenario example:

Scenario Example :

  • The v0.5.0 version of MatrixOne is runing by Docker.

  • The container path is not attached to the local disk, and historical data needs to be preserved before the upgrade.

1.Back up the store directory in the container to the host

① Check the containers of the currently running Matrixone, and check whether the Matrixone is running. If the Matrixone is running, stop the Matrixone.

  1. docker ps
  2. docker stop matrixone

② Copy the store directory from the current Matrixone container to the local backup path.

  1. docker cp matrixone:/store ${path_name}/

${path_name} indicates the backup path of store.

2. Remove v0.5.0 version of MatrixOne

  1. docker rm matrixone

3. Download the MatrixOne v0.5.1 image

Use the following command to download the MatrixOne v0.5.1 image from Docker Hub.

  1. docker pull matrixorigin/matrixone:0.5.1

4. Run the container and mount the /store directory

Run the container and mount the ‘/store’ directory to the location of the backed-up store folder on your local disk:

  1. docker run -d -p 6001:6001 -v ~/tmp/store:/store:rw --name matrixone matrixorigin/matrixone:0.5.1

To customize the configuration file, you can mount the custom configuration file stored on the local disk.

  1. docker run -d -p 6001:6001 -v ${path_name}/system_vars_config.toml:/system_vars_config.toml:ro -v ${path_name}/store:/store:rw --name matrixone matrixorigin/matrixone:0.5.1

For the information on the user name and password, see the next step - Connect to MatrixOne Server.

5. Connect to MatrixOne Server

When you finish installing MatrixOne, you can refer to the section below to connect to the MatrixOne server.

See Connect to MatrixOne server.

Reference

For more information on deployment,seeDeployment FAQs.