---
title: "Import data from .ravendbdump file"
description: "Import a .ravendbdump file into a RavenDB database through Studio, with collection filtering and transform script options."
url: "https://docs.ravendb.net/7.2/studio/database/tasks/import-data/import-data-file"
version: "7.2"
---

# Import data from .ravendbdump file

> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

## Import data from .ravendbdump file

> **Note**
>
> - `.ravendbdump` is RavenDB's format for [exporting data](https://docs.ravendb.net/7.2/studio/database/tasks/export-database.md) into and out of files.
>
> - A `.ravendbdump` file can be used to migrate data from one database to another.  
>   It is commonly used when a database is upgraded.
>
> - An exported `.ravendbdump` file can also migrate data from a non-sharded database into a sharded database.  
>   Learn more in the [section dedicated to this operation](https://docs.ravendb.net/7.2/sharding/import-and-export.md#import).
>
> - In this article:
>   - [Import data from a file](#import-data-from-a-file)
>   - [Import options](#import-options)
>   - [Advanced import options](#advanced-import-options)
>     - [Import all collections](#1-import-all-collections)
>     - [Use Transform script](#2-use-transform-script)
>     - [Customize Configuration and Ongoing Tasks](#3-customize-configuration-and-ongoing-tasks)
>     - [Set Max Read Operations Per Second](#4-set-max-read-operations-per-second)
>     - [Import Command](#5-import-command)

## Import data from a file {#import-data-from-a-file}

If you have already [exported a database](https://docs.ravendb.net/7.2/studio/database/tasks/export-database.md), follow these steps in Studio when you are ready to import from the file.

![Importing a database from a file](https://docs.ravendb.net/assets/images/studio-view-import-fromfile-steps-1ffd58b86cbc2af1d7ef95cd8402a3ee.png)

1. Select the **Tasks menu**.

2. Open the **Import data** view.

3. **From file** tab.  
   Select the **From file (.ravendbdump)** tab to import from a database that was previously [exported](https://docs.ravendb.net/7.2/studio/database/tasks/export-database.md) to a file.

4. **Overwrite warning**.  
   Be aware that importing from a file will overwrite any existing documents and indexes that share the same IDs.  
   To avoid rewriting your data, you can [create a new database](https://docs.ravendb.net/7.2/studio/database/create-new-database/general-flow.md) and import into it.

5. **Select file**.  
   Choose the exported `.ravendbdump` file that you want to import data from, by entering the file name or browsing your file system.

6. **Import options**  
   Select the data to import from the file. See [Import options](#import-options) below.  
   If you exported an encrypted file, enable **Imported file is encrypted** and provide the encryption key.

7. **Advanced**  
   Present [advanced import options](#advanced-import-options).

8. **Import Database**  
   Click to import the selected data.

## Import options {#import-options}

![Import options](https://docs.ravendb.net/assets/images/import-from-file-options-714b656312554702b06838ef41ef12cb.png)

Select the entities that you want to import:

| 1. Documents and Extensions | 2. Cluster Entities |
| - | - |
| [Documents](https://docs.ravendb.net/7.2/studio/database/documents/document-view.md) | [Indexes](https://docs.ravendb.net/7.2/indexes/what-are-indexes.md) |
|    [Attachments](https://docs.ravendb.net/7.2/document-extensions/attachments/overview.md) |    [Index history](https://docs.ravendb.net/7.2/studio/database/indexes/index-history.md) |
|    [Legacy attachments](https://docs.ravendb.net/7.2/studio/database/create-new-database/from-legacy-files.md) |    [Remove analyzers](https://docs.ravendb.net/7.2/indexes/using-analyzers.md) |
|    [Counters](https://docs.ravendb.net/7.2/document-extensions/counters/overview.md) | [Identities](https://docs.ravendb.net/7.2/client-api/document-identifiers/working-with-document-identifiers.md) |
|    [Time series](https://docs.ravendb.net/7.2/document-extensions/timeseries/overview.md) | [Subscriptions](https://docs.ravendb.net/7.2/data-subscriptions/overview.md) |
|    [Revisions](https://docs.ravendb.net/7.2/document-extensions/revisions/overview.md) | [Configuration and Ongoing Tasks](#3-customize-configuration-and-ongoing-tasks) |
| [Artificial documents](https://docs.ravendb.net/7.2/studio/database/indexes/create-map-reduce-index.md#artificial-documents--vs--regular-documents) | [Compare exchange items](https://docs.ravendb.net/7.2/compare-exchange/overview.md) |
| [Archived documents](https://docs.ravendb.net/7.2/data-archival/overview.md) | Compare exchange tombstones |
| [Expired documents](https://docs.ravendb.net/7.2/documents/document-expiration/client-api.md) | |
| [Conflicts](https://docs.ravendb.net/7.2/client-api/cluster/document-conflicts-in-client-side.md) | |
| Document tombstones | |
| Time-series deleted ranges | |

Options that are selected but have no matching items in the imported file are skipped during import.

**3. Imported file is encrypted**  
Enable this option when importing from an encrypted file, and provide the decryption key.  
Make sure that **Encrypt exported file** was enabled when exporting from the source database.

## Advanced import options {#advanced-import-options}

Click **Advanced** to reveal the following options.

![Advanced import options](https://docs.ravendb.net/assets/images/import-from-file-advanced-transform-options-362aa742071a348c6a0a8fdf82330a57.png)

#### 1. Import all collections

![Import specific collections](https://docs.ravendb.net/assets/images/import-from-file-import-all-collections-bd67c0b65efaa619a919851dab2f14a4.png)

By default, **all** exported collections are imported.  
To import only specific collections, disable **Import all collections**, enter the name of each collection that you want to import, and click **Add collection**.  
Enter collection names exactly as they appear in the source database.

#### 2. Use Transform script

![Use transform script](https://docs.ravendb.net/assets/images/import-from-file-advanced-transform-script-48153a5cb34401a977c0b7f9c4208872.png)

Enable this option to provide a JavaScript transform script that runs on each document imported from the file.

The current document is available under the `this` variable.  
The `@change-vector`, `@id`, and `@last-modified` metadata fields are not available to the script.

For example, use the following script to skip discontinued products and stamp every imported document with the time it was imported:

```javascript
// Skip documents you don't want to import
// (throwing 'skip' filters the document out)
if (this.Discontinued === true) {
    throw 'skip';
}

// Add or modify regular fields on the imported document
this.ImportedAt = new Date().toISOString();
```

#### 3. Customize Configuration and Ongoing Tasks

![Customize configuration and ongoing tasks](https://docs.ravendb.net/assets/images/import-from-file-advanced-configuration-ongoing-tasks-f3ae1fe322e9e67676502f6f29efd103.png)

Use this option to select ongoing tasks, configurations, and connection strings to import.  
Selected options with no matching items in the imported file will be skipped during import.

| Ongoing tasks | Other | Connection Strings |
| - | - | - |
| [Periodic backups](https://docs.ravendb.net/7.2/backup/create/periodic-tasks/database-backup.md) | [Settings](https://docs.ravendb.net/7.2/studio/database/settings/database-settings.md) | RavenDB connection strings |
| [External replications](https://docs.ravendb.net/7.2/studio/database/tasks/ongoing-tasks/external-replication-task.md) | [Conflict solver configuration](https://docs.ravendb.net/7.2/client-api/operations/server-wide/modify-conflict-solver.md) | SQL connection strings |
| [RavenDB ETLs](https://docs.ravendb.net/7.2/server/ongoing-tasks/etl/raven.md) | [Client configuration](https://docs.ravendb.net/7.2/studio/server/client-configuration.md) | Snowflake connection strings |
| [SQL ETLs](https://docs.ravendb.net/7.2/server/ongoing-tasks/etl/sql.md) | [Revisions configuration](https://docs.ravendb.net/7.2/document-extensions/revisions/client-api/operations/configure-revisions.md) | OLAP connection strings |
| [Snowflake ETLs](https://docs.ravendb.net/7.2/server/ongoing-tasks/etl/snowflake.md) | [Document refresh](https://docs.ravendb.net/7.2/documents/document-refresh/client-api.md) | Elasticsearch connection strings |
| [OLAP ETLs](https://docs.ravendb.net/7.2/server/ongoing-tasks/etl/olap.md) | [Document expiration](https://docs.ravendb.net/7.2/documents/document-expiration/client-api.md) | Queue connection strings (Kafka, RabbitMQ, Azure queue storage) |
| [Elasticsearch ETLs](https://docs.ravendb.net/7.2/server/ongoing-tasks/etl/elasticsearch.md) | [Documents compression](https://docs.ravendb.net/7.2/server/storage/documents-compression.md) | [AI connection strings](https://docs.ravendb.net/7.2/ai-integration/connection-strings/overview.md) |
| [Queue ETLs](https://docs.ravendb.net/7.2/server/ongoing-tasks/etl/queue-etl/overview.md) (Kafka, RabbitMQ, Azure queue storage) | [Time series configuration](https://docs.ravendb.net/7.2/studio/database/settings/time-series-settings.md) | |
| [Replication hubs](https://docs.ravendb.net/7.2/studio/database/tasks/ongoing-tasks/hub-sink-replication/overview.md) | [Custom sorters](https://docs.ravendb.net/7.2/querying/sorting-query-results/custom-sorters/overview.md) | |
| [Replication sinks](https://docs.ravendb.net/7.2/studio/database/tasks/ongoing-tasks/hub-sink-replication/overview.md) | [Custom analyzers](https://docs.ravendb.net/7.2/studio/database/settings/custom-analyzers.md) | |
| [Embeddings Generation](https://docs.ravendb.net/7.2/ai-integration/generating-embeddings/overview.md) | [PostgreSQL integration](https://docs.ravendb.net/7.2/integrations/postgresql-protocol/overview.md) | |
| [GenAI](https://docs.ravendb.net/7.2/ai-integration/gen-ai-integration/overview.md) | [AI agents](https://docs.ravendb.net/7.2/ai-integration/ai-agents/overview.md) | |
| | [Remote attachments](https://docs.ravendb.net/7.2/document-extensions/attachments/configure-remote-attachments.md) | |

> **Note**
>
> Imported ongoing tasks are **disabled** by default.

#### 4. Set Max Read Operations Per Second

![Set max read operations per second](https://docs.ravendb.net/assets/images/import-from-file-max-read-ops-per-second-fdba0ba86fcb53eecde651e8b59f5bd3.png)

Enable this option to set a maximum number of read operations per second for the import.  
Capping this rate makes the import lighter on the server, leaving more capacity for other work running on the database while the import is in progress, at the cost of a slower import.

#### 5. Import Command

![Import command](https://docs.ravendb.net/assets/images/import-command-powershell-5f2e936fcd835de9c20079a9653324b5.png)

Studio can generate a ready-to-run command that performs this same import from a command line, using the options you configured above.  
This is useful for repeating the import later or running it from a script.

Select the format you need, **PowerShell**, **Cmd**, or **Bash**, then click the copy icon to copy the generated command to the clipboard.

The command uses `curl` to send your `.ravendbdump` file and the selected options to the database's import endpoint.  
For example, the generated PowerShell command looks similar to this:

```powershell
curl.exe -F 'importOptions={\"OperateOnTypes\":\"Documents,Indexes\",\"IncludeExpired\":true}' -F 'file=@.\Northwind.ravendbdump' http://127.0.0.1:8080/databases/Northwind/smuggler/import
```
