# Major Release Upgrades for MariaDB ColumnStore

This page provides a major release upgrade procedure for MariaDB ColumnStore. A major release upgrade is an upgrade from an older major release to a newer major release, such as an upgrade from MariaDB ColumnStore 5 to MariaDB ColumnStore 22.08.

### Compatibility

* ColumnStore 5
* ColumnStore 6
* ColumnStore 22.08

### Prerequisites

This procedure assumes that the new ColumnStore version will be installed onto new servers.

**To reuse existing servers** for the new ColumnStore version, you must adapt the procedure detailed below. After step 1, confirm all data has been backed-up and verify backups. The old version of ColumnStore should then be uninstalled, and all ColumnStore files should be deleted before continuing with step 2.

### Step 1: Backup/Export Schemas and Data

On the **old ColumnStore cluster**, perform a full backup.

MariaDB recommends backing up the table schemas to a single SQL file and backing up the table data to table-specific CSV files.

1. For each table, obtain the table's schema by executing the `SHOW CREATE TABLE` [statement](/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-table.md):

   ```sql
   SHOW CREATE TABLE DATABASE_NAME.TABLE_NAME\G
   ```

   Backup the table schemas by copying the output to an SQL file. This procedure assumes that the SQL file is named `schema-backup.sql`.
2. For each table, backup the table data to a CSV file using the `SELECT .. INTO OUTFILE` [statement](/docs/server/reference/sql-statements/data-manipulation/selecting-data/select-into-outfile.md):

   ```sql
   SELECT * INTO OUTFILE '/path/to/DATABASE_NAME-TABLE_NAME.csv'
   FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
   LINES TERMINATED BY '\n'
   FROM DATABASE_NAME.TABLE_NAME;
   ```
3. Copy the SQL file containing the table schemas and the CSV files containing the table data to the primary node of the new ColumnStore cluster.

### Step 2: Install New Major Release

On the **new ColumnStore cluster**, follow the deployment instructions of the desired topology for the new ColumnStore version.

For deployment instructions, see "[MariaDB Topologies](/docs/server/architecture/topologies.md)".

### Step 3: Restore/Import Data

On the **new ColumnStore cluster**, restore the table schemas and data.

1. Restore the schema backup using [mariadb client](/docs/server/clients-and-utilities/mariadb-client.md):

   ```bash
   mariadb --host HOST --port PORT --user USER --password < schema-backup.sql
   ```

   * `HOST` and `PORT` should refer to the following:
     * If you are connecting with MaxScale as a proxy, they should refer to the host and port of the MaxScale listener
     * If you are connecting directly to a multi-node ColumnStore cluster, they should refer to the host and port of the primary ColumnStore node
     * If you are connecting directly to single-node ColumnStore, they should refer to the host and port of the ColumnStore node
   * When the command is executed, `mariadb` client prompts for the user password
2. For each table, restore the data from the table's CSV file by executing the [cpimport utility](/docs/analytics/mariadb-columnstore/clients-and-tools/data-import/mariadb-enterprise-columnstore-data-loading-with-cpimport.md) on the primary ColumnStore node:

   ```bash
   sudo cpimport -s ',' \
      DATABASE_NAME \
      TABLE_NAME \
      /path/to/DATABASE_NAME-TABLE_NAME.csv
   ```

### Step 4: Test

On the **new ColumnStore cluster**, verify that the table schemas and data have been restored.

1. For each table, verify the table's definition by executing the `SHOW CREATE TABLE` statement:

   ```sql
   SHOW CREATE TABLE DATABASE_NAME.TABLE_NAME\G
   ```
2. For each table, verify the number of rows in the table by executing `SELECT COUNT(*)`:

   ```sql
   SELECT COUNT(*) FROM DATABASE_NAME.TABLE_NAME;
   ```
3. For each table, verify the data in the table executing the [SELECT](/docs/server/reference/sql-statements/data-manipulation/selecting-data/select.md) statement.

   If the table is very large, you can limit the number of rows in the result set by adding a `LIMIT` clause:

   ```sql
   SELECT * FROM DATABASE_NAME.TABLE_NAME LIMIT 100;
   ```

<sub>*This page is: Copyright © 2025 MariaDB. All rights reserved.*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/analytics/mariadb-columnstore/management/deployment/upgrades/major-release-upgrades-for-mariadb-enterprise-columnstore.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
