Export Database to a .ravendbdump file
-
A
.ravendbdump
file is RavenDB's format for exporting/importing a database, with backward compatibility between RavenDB versions. -
To export a
.ravendbdump
file, we need an existing source database which you can export to file, then import into an empty destination database.
In this page:
- Select database
Select the database to be exported.
It can be selected at the top of the Studio or by choosing from the detailed list of databases. - Tasks
Click the Tasks tab. - Export Database
Select Export Database to open the export options view.
Export options
Here you can filter the data you want to export, include encryption key, select collections and configurations, and apply a transform script on your documents.
Export Options
-
Include Documents
Toggle to include documents and to enable inclusion of the following document related items:- Include Attachments
Determines whether or not legacy attachments contained in the file should be imported where legacy attachments refers to v2.x and v3.x attachments. - Include Counters
- Include Artificial Documents
- Include Revisions
- Include Conflicts
- Include Attachments
-
Other Features
-
Imported file is encrypted
Toggle to include the decryption key when importing data from encrypted file.
Import settings for items that don't exist in source database
If any of the options is set but the source database doesn't contain items of that type, the item will be skipped.
Advanced export options
Select Advanced Export Options
-
Advanced
Click the Advanced button to access the advanced export options.
Export all collections
In the Studio, select database > click Task tab > select Export Database > click the Advanced button at the bottom > toggle "Export all collections".
Advanced export options - Export all collections
-
Export all collections:
Determines whether to export All database collections.- This is on by default which means that all of the collections the database will be exported.
-
If Export all collections is disabled, a list of all database collections will be displayed with an option to filter collections by name.
- Toggle "On" (switch becomes red and white) to include specific collections in the export.
Transform Script
In the Studio, select database > click Task tab > select Export Database > click the Advanced button at the bottom > toggle "Use Transform Script".
Advanced export options - Transform Script
- Use Transform Script:
Enabling it allows you to provide a transform javascript, that would operate on each document contained by the file.
Sample transform javascript:
var id = doc['@metadata']['@id'];
if (id === 'orders/999')
throw 'skip'; // filter-out
Customize Configuration and Ongoing Tasks
In the Studio, select database > click Task tab > select Export Database > click the Advanced button at the bottom > toggle "Customize Configuration and Ongoing Tasks".
Advanced export options - Customize Configuration and Ongoing Tasks
Ongoing tasks:
- Periodic Backups
- External replications
- ETL Tasks - Extract, Transform, Load
- Pull Replication Sinks
- Pull Replication Hubs
Other:
- Settings
- Conflict Solver Configuration
- Revisions Configuration
- Document Expiration
- Client Configuration
- Custom Sorters
Connection Strings
- Connection Strings used by ETL tasks to authenticate and connect to external databases will be exported.
Export Command via PowerShell
In the Studio, select database > click Task tab > select Export Database > click the Advanced button at the bottom.
Advanced export options - Copy command as PowerShell
- Generates the commands to run the exporting logic that you configure in this studio view from PowerShell.