Installation: Upgrading to a new version
On a live system, a minor version upgrade process typically takes 30 seconds.
Manual upgrade of RavenDB instance to a new version is very simple. In order to do so, you:
- Download distribution package from here.
- Shutdown the RavenDB server (this depends on your deployment strategy. For a service - shutdown the service. For a IIS site - shutdown the IIS site).
- Remove old RavenDB binaries. Make sure not to delete your actual data which is in the folders like
Dataand not to overwrite your configuration files like
- Copy new binaries
- Start the server again.
The RavenDB installer supports upgrades. The previously used settings (like a service name or an installation path) will be recovered by the wizard. The installation process first will automatically remove the old version and then install a new one.
If you want a zero downtime, you can setup a failover server which will handle requests until the primary server is started up. The steps to do so are as follows:
- Setup a replication between the primary and secondary server.
- Wait until the second node will get all the docs from the primary node (for 10 minutes minimum, in order to make sure that any clients had a chance to get updated with the new replication information).
- Shutdown primary server (clients will now silently failover to the secondary server).
- Remove old RavenDB binaries. Make sure to not delete your actual data which is in folders like
Data, or overwrite your configuration files like
- Copy new binaries
- Start primary server again.
- Shutdown and update the secondary server.
Upgrading data files
You don't have to do anything when you upgrade RavenDB to migrate the stored data. However, sometimes our adjustments require changing the file format. RavenDB includes support for performing of those kind of migrations automatically on startup if it finds that the stored database is using an old format.
Data file migrations are only one way. If you want to move backward and any changes in the file format have occurred, RavenDB will fail to start (with a detailed error message). You can move data between different versions using the import/export tool, which works across all versions of RavenDB.
- If you have secondary node running only for the duration of the actual update, you don't need a license.
- If you have secondary node running constantly (hot backup), you do need a license.
Major version upgrade
In case of a major version upgrade (like 2.5 to 3.5) you need to validate the previous configuration before applying the upgrade. You will have better replace the old configuration file with a new one having options adjusted to the current version.