Export Database to a .ravendbdump file
.ravendbdumpfile is RavenDB's format for exporting/importing a database, with backward compatibility between RavenDB versions.
To export a
.ravendbdumpfile, we need an existing source database which you can export to file, then import into an empty destination database.
In this page:
- Export Database to a .ravendbdump file
- 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.
Click the Tasks tab.
- Export Database
Select Export Database to open the export options view.
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.
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
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
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.
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:
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
- Periodic Backups
- External replications
- ETL Tasks - Extract, Transform, Load
- Pull Replication Sinks
- Pull Replication Hubs
- Conflict Solver Configuration
- Revisions Configuration
- Document Expiration
- Client Configuration
- Custom Sorters
- 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.