The structure of the RavenDB directories cannot be changed. An exception is locations of temporary files for documents and indexes, that can be changed by setting appropriate configuration options.
However, you can store any RavenDB data files or directories in whatever location you choose, by defining junction points (Windows) or mount points (Linux).
Example - Moving Journals
A common practice is to store the journals on a very fast drive to achieve better write performance.
The following command will point the
Journals directory of the Northwind database to a path on a different drive.
C:\RavenDB\Server\RavenData\Databases\Northwind>mklink /J Journals E:\Journals\Northwind
ln -s ~/RavenDB/Server/RavenData/Databases/Northwind/Journals /mnt/FastDrive/Databases/Northwind/Journals
Example - Moving Indexes
If you want to store the data of all indexes of the Northwind database in the custom location, you can use the following command:
C:\RavenDB\Server\RavenData\Databases\Northwind>mklink /J Indexes D:\Indexes\Northwind
Creation of junction / mount points requires the database to be offline
If data already exists in the directory, and you want to define the junction (Windows) or mount (Linux) point, you need to create a backup of the data first, and copy it back into the directory after executing the command.
ln -s ~/RavenDB/Server/RavenData/Databases/Northwind/Indexes /mnt/FastDrive/Databases/Northwind/Indexes
Start RavenDB server after creating soft link to a faster drive mount point: