rpk topic storage mode-migration migrate-tiered

Migrate tiered_v1 topics to tiered_v2.

This command sets each selected topic`s redpanda.storage.mode.impl' property to `tiered_v2.

A topic is selected when all of these are true: * 'redpanda.storage.mode.impl' is tiered_v1, or it is unset and 'redpanda.remote.write' is enabled. * Its partitions upload to object storage. * It is not a read replica.

All other topics are skipped. Topics in kafka_nodelete_topics or kafka_noproduce_topics are also skipped. To migrate one of these, remove it from the list, then pass it with --topics.

Use --topics to list the topics to migrate, or --all to migrate every tiered_v1 topic in the cluster. --all implies --update-default.

The --update-default flag makes new tiered topics use tiered_v2, and. updates the default to tiered_v2 if it was previously tiered_v1: * It sets default_redpanda_storage_mode_tiered_impl to tiered_v2. * If default_redpanda_storage_mode is unset and cloud_storage_enable_remote_write is enabled, it also sets. default_redpanda_storage_mode to tiered. The command waits for every broker to apply the new defaults before it. migrates any topic, and fails if one does not within 30 seconds. Use. '`--update-default=false'` to keep the cluster defaults.

Migration requires: * cloud_storage_enabled set to true. * The topic_storage_mode_migration cluster feature active. * The enable_topic_storage_mode_migration cluster property enabled. The command checks all three before it changes anything.

The command returns after each migration has started. Use rpk topic storage mode-migration describe to track progress. It exits with a non-zero status if any topic fails to start migrating.

This command was introduced in version v26.3.1.

Usage

rpk topic storage mode-migration migrate-tiered [flags]

Examples

This section provides examples of how to use rpk topic storage mode-migration migrate-tiered.

Migrate two topics:

rpk topic storage mode-migration migrate-tiered --topics foo,bar

Migrate every tiered_v1 topic and change the cluster defaults:

rpk topic storage mode-migration migrate-tiered --all

Migrate every tiered_v1 topic without changing the cluster defaults:

rpk topic storage mode-migration migrate-tiered --all --update-default=false

Flags

Value Type Description

--all

bool

Migrate every tiered_v1 topic in the cluster.

--format

string

Output format (json,yaml,text,wide,help). Default: text.

--topics

stringSlice

Comma-separated list of topics to migrate.

--update-default

bool

Change cluster defaults so new topics use tiered_v2.

Global flags

Value Type Description

--config

string

Redpanda or rpk config file; default search paths are ~/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml.

-X, --config-opt

stringArray

Override rpk configuration settings; -X help for detail or -X list for terser detail.

--ignore-profile

bool

Ignore rpk.yaml and redpanda.yaml; use default settings.

--profile

string

rpk profile to use.

-v, --verbose

bool

Enable verbose logging.