Rename a database in RavenDB

This is just a quick post which explains how you can rename an existing database in RavenDB. Actually you can’t. What you can apply is the following procedure:

  1. Create a new destination database in RavenDB with the new desired name
  2. Export the source database into a RavenDB dump
  3. Import the dump into the destination database

This operation is an offline operation. You could also use the replication bundle to replicate information from one database into the other on the same server but this only works when you already have setup the source database with the replication bundle activated. I’m not going to cover replication in this blog post.

Let’s us assume your source database has similar data like mine:


Create a new destination database called “destination”. Now here is your chance to enable all the bundles you previously wished you had 😉


Goto the Tasks tab of the source database and export the database including everything necessary like attachements, indexes etc. into a dump file.


Switch back to the destination database, goto the Tasks tab and choose to import the previously exported dump file.


After the successful import all documents, indexes etc. are moved into the new destination database.



About the author

Daniel Marbach

1 comment

Recent Posts