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:

Figure 1. Choose and Export Database

  1. 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.
  2. Tasks
    Click the Tasks tab.
  3. 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.

Figure 3. Export Options

Export Options

  1. Include Documents
    Toggle to include documents and to enable inclusion of the following document related items:

  2. Other Features

  3. 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

Select Advanced Export Options

  1. 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".

Figure 4. Advanced Export Options - 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".

Figure 5. Advanced Export Options - 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".

Figure 6. Advanced Export Options - Customize Configuration and Ongoing Tasks

Advanced export options - Customize Configuration and Ongoing Tasks

Ongoing tasks:

Other:

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.

Figure 7. Advanced Export Options - Copy command as PowerShell

Advanced export options - Copy command as PowerShell

  • Generates the commands to run the exporting logic that you configure in this studio view from PowerShell.