---
title: "Data Migration"
description: "* In this page:"
url: "https://docs.ravendb.net/6.2/migration/server/data-migration"
version: "6.2"
---

# Data Migration

> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

## Data Migration

> **Note**
>
> - In this page:
>   - [Migration from RavenDB 5.x to 6.x](#migration-from-ravendb-5x-to-6x)
>   - [Migration from RavenDB 4.x to RavenDB 5.x and 6.x](#migration-from-ravendb-4x-to-ravendb-5x-and-6x)
>   - [Migration from RavenDB 3.x](#migration-from-ravendb-3x)
>   - [Migrating data into a sharded database](#migrating-data-into-a-sharded-database)

## Migration from RavenDB 5.x to 6.x

- RavenDB `6.x` supports in-place migration of data from RavenDB `5.x`.
- RavenDB `5.x` product licenses **do not apply** to RavenDB `6.x`.  
  To upgrade a valid `5.x` license to a RavenDB `6.x` license,  
  please use the **License upgrade tool** [as explained here](https://docs.ravendb.net/6.2/start/licensing/replace-license.md#upgrade-a-license-key-for-ravendb-6x).

> **Warning**
>
> Please note that once upgraded, RavenDB `6.x` cannot be downgraded to version `5.x`,  
> and the migrated data will no longer be accessible via RavenDB `5.x`.  
> **Please create a backup of your data before migrating.**

## Migration from RavenDB 4.x to RavenDB 5.x and 6.x

- RavenDB `5.x` supports in-place migration of data from RavenDB `4.x`.
  > **Info**
  >
  > It is also possible to upgrade directly from version `4.x` to `6.x`,  
  > but it is recommended to first upgrade RavenDB `4.x` to `5.x`, and then proceed from `5.x` to `6.x`.
- RavenDB `4.x` product licenses **do not apply** to RavenDB `6.x`.  
  To upgrade a valid `4.x` license to a RavenDB `6.x` license,  
  please use the **License upgrade tool** [as explained here](https://docs.ravendb.net/6.2/start/licensing/replace-license.md#upgrade-a-license-key-for-ravendb-6x).

> **Warning**
>
> Please note that once upgraded, RavenDB `6.x` cannot be downgraded to version `4.x`,  
> and data migrated to `5.x` or `6.x` will no longer be accessible via RavenDB `4.x`.  
> **Please create a backup of your data before migrating.**

## Migration from RavenDB 3.x

- The information above relates only to data migration from RavenDB `4.x` to `5.x`/`6.x` and from `5.x` to `6.x`.
- If you want to migrate your data from a RavenDB version earlier than `4.x`,  
  please read the dedicated article [here](https://ravendb.net/docs/article-page/4.2/csharp/migration/server/data-migration).

## Migrating data into a sharded database

If you want to migrate your data to a [sharded](https://docs.ravendb.net/6.2/sharding/overview.md) database (supported by RavenDB `6.0` and above),  
please read the related article [here](https://docs.ravendb.net/6.2/sharding/migration.md).
