Data Migration
-
Upgrading RavenDB
6.xand above to a higher version supports in-place data migration: exporting and re-importing the data are not needed. -
Create a backup of your data before upgrading, to avoid any data loss in case of unexpected issues.
-
Find a migration guide for RavenDB
5.xand earlier versions here. -
In this article:
Migration to RavenDB 7.x from a lower version
Migration and NLog
Starting with version 7.0, RavenDB incorporates the
NLog logging framework and writes all log
data through it.
Logging settings applied in earlier RavenDB versions are respected by RavenDB 7.x,
and logging should continue by these settings without interference after the migration.
If you want to use NLog-specific features, though, you will have to address a different set
of settings that NLog requires.
Learn more here about migration and the new logging system..
Migration and HTTP compression
From RavenDB 7.0 on, the default HTTP compression algorithm is Zstd.
Earlier versions used Gzip.
-
If your current server version is
6.0or higher, the compression algorithm will present no problem while connecting it to RavenDB7.0or higher and migrating your data. -
If your current server version is
5.4or earlier, attempting to connect it to a server that uses theZstdcompression algorithm will fail.
For the connection to succeed, you need to:- Temporarily switch the target version
7.xserver compression algorithm toGzip.
Do this by defining aRAVEN_HTTP_COMPRESSION_ALGORITHMenvironment variable on the7.xserver machine and setting its value toGzip, and restarting the server. - Connect your current server to the new server and perform the migration.
- When the new server is updated, remove the environment variable and restart the server.
- Temporarily switch the target version
Migrating data into a sharded database
If you want to migrate your data to a sharded database (supported by RavenDB 6.0 and above),
please read the related article here.