[id='migrating-cache-stores_{context}']
= Migrating {brandname} cache stores
You can use the `StoreMigrator` to migrate data between cache stores with different {brandname} versions or to migrate data from one type of cache store to another.

.Prerequisites

* Have a  `infinispan-tools.jar`.
* Have the source and target cache store configured in the `migrator.properties` file.

.Procedure

* If you built the `infinispan-tools.jar` from the source code, do the following:
+
. Add `infinispan-tools.jar` to your classpath.
. Add dependencies for your source and target databases, such as JDBC drivers to your classpath.
. Specify `migrator.properties` file as an argument for `StoreMigrator`.

* If you pulled `infinispan-tools.jar` from the Maven repository, run the following command:
+
[source,xml,options="nowrap",subs=attributes+]
----
mvn exec:java
----
