Data migration in Kafka cluster can be viewed in different aspects. You may want to migrate data to newly-added disk drives in the same cluster and then decommission old disks. You may want to move data to a secure cluster or to newly-added brokers and then decommission old brokers. You may want to move data to a different new cluster altogether or to the Cloud. Sometimes, you also end up migrating Zookeeper servers. In this section, we will, in general, discuss one of the scenarios mentioned earlier.
Let's consider the scenario where we want to add new hard drives/disks and decommission old ones on broker servers. Kafka data directories contain topic and partition data. You can always configure more than one data directory, and Kafka will balance the partition or topic data across these directory locations.