---
title: "Import Data from a Live RavenDB Server"
description: "* In addition to importing data from a .ravendbdump file,"
url: "https://docs.ravendb.net/6.2/studio/database/tasks/import-data/import-from-ravendb"
version: "6.2"
---

# Import Data from a Live RavenDB Server

> 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 a Live RavenDB Server

> **Note**
>
> - In addition to importing data from a [.ravendbdump](https://docs.ravendb.net/6.2/studio/database/tasks/import-data/import-data-file.md) file,
>   data can also be imported directly from an existing database on a **live RavenDB server**.
>
> - Backward compatibility is supported.  
>   You can import a database from a previous RavenDB version into your current server.
>
> - The process consists of the following steps:  
>   1st Step: [Prepare Servers for the Import Process](#1st-step:-prepare-servers-for-the-import-process)  
>   2nd Step: [Access the Import View](#2nd-step:-access-the-import-view)  
>   3rd Step: [Set the Source Server URL and database](#3rd-step:-set-the-source-server-url-and-database)  
>   4th Step: [Set Import Options](#4th-step:-set-import-options)  
>   5th Step: [Advanced Import Options](#5th-step:-advanced-import-options)

## 1st Step: Prepare Servers for the Import Process

- Before migrating data from a secure source server, the destination server must also be secure.  
  You must pass the certificate from the destination to the source server.  The following steps explain how.

- Perform this step only if your source RavenDB server is a secure verion 4.x (or newer) server that is running on HTTPS.  For other servers, skip this step and continue to [Step 2](#2nd:-access-the-import-view).

- To import, the destination server needs to access the existing source database and fetch data from it.  
  To grant such access, you must first register the destination server certificate as a client certificate on your source server.

- To accomplish this, follow these steps:

![Manage Server-Certificates View](https://docs.ravendb.net/assets/images/importing-exporting-certificates-fea0f3b1d5659c4d35196ae96bec00e4.png)

1. **Manage Server**  
   Click the Manage Server tab.

2. **Certificates**.  
   Select Certificates. (See [Certificates Management](https://docs.ravendb.net/6.2/server/security/authentication/certificate-management.md)) for more information on this Studio view.

3. **Server certificates**  
   Export the destination RavenDB certificate **from the DESTINATION RavenDB server**.  
   ![Export server certificate](https://raw.githubusercontent.com/ravendb/docs/main/versioned_docs/version-6.2/studio/database/tasks/import-data/assets/import-from-raven-export-server-certificate.png)

   - Choose **Export Server Certificates** option from the **Server Certificates** dropdown.

4. **Client certificate**  
   Register this certificate on the **SOURCE RavenDB server**  
   ![Register exported certificate as client certificate](https://raw.githubusercontent.com/ravendb/docs/main/versioned_docs/version-6.2/studio/database/tasks/import-data/assets/import-from-raven-upload-server-cert-as-client-cert.png)

   - Choose **Upload client certificate** to upload the exported certificate as the client certificate.

5. **Upload client certificate**  
   Set the certificate details.  
   ![Import certificate details](https://docs.ravendb.net/assets/images/import-from-raven-upload-server-cert-as-client-cert-details-19744d094db2961cd91e52aaec5f478e.png)

6. **Name**  
   Enter a name for this certificate. For future clarity, consider naming each certificate after the role that it will enable in your system (Full Stack Development, HR, Customer, Unregistered Guest, etc...)

7. **Security Clearance**  
   Set [authorization level](https://docs.ravendb.net/6.2/server/security/authorization/security-clearance-and-permissions.md) for this certificate.
   Read about [Security Clearance](https://docs.ravendb.net/6.2/server/security/authorization/security-clearance-and-permissions.md#authorization-security-clearance-and-permissions) to choose appropriate level.

8. **Certificate file**  
   Upload the `.pfx` certificate file from the destination server installation folder.

9. **Certificate Passphrase**  
   (Optional) Set a password for this certificate.

10. **Database permissions**  
    Select databases and permission levels for this certificate.  
    If you choose *User* security clearance, you can give access to specific databases on the server and
    configure [User](https://docs.ravendb.net/6.2/server/security/authorization/security-clearance-and-permissions.md#user)
    authorization levels for this certificate.

Click **Upload** to complete the process.  
The uploaded certificate will be added to the list of registered client certificates on this server.

## 2nd Step: Access the Import View

![Databases List](https://docs.ravendb.net/assets/images/import-from-ravendb-db-list-265a8ac92869091debcae5eca915bed3.png)

On the **destination** RavenDB server, select a **database** into which the data will be imported.

> **Warning**
>
> 1. Verify that this database is empty as the import will overwrite any existing content.

![Import Data](https://docs.ravendb.net/assets/images/import-from-ravendb-from-ravendb-d429ecad7c26c0fb9eefe549aad5a140.png)

1. Click **Tasks** tab.
2. Select **Import Data**.
3. Select **From RavenDB**.

## 3rd Step: Set the Source Server URL and database

- Specify the source server URL and select the database to import the data from.

![Import configuration](https://docs.ravendb.net/assets/images/import-from-ravendb-configuration-73a515f153cd610f132e15455b18e10e.png)

1. **Server URL**  
   Paste URL of the server you want to import from.
2. **Server Version**  
   The version of the server that you want to import from will show here once you enter the URL.
3. **Database Name**  
   Enter the name of the database that you want to migrate your data from.

## 4th Step: Set Import Options

- Filter the data you want to import.
- Customize advanced configuration and apply a transform script under the [Advanced Import Options](#step-#5:-advanced-import-options).

![Import Options](https://docs.ravendb.net/assets/images/import-from-ravendb-options-5a84919495bb5fce095887ac0240da42.png)

> **Note**
>
> Toggling Import Options determines whether the following items will be imported:

1. **Documents**

- [Include Documents](https://docs.ravendb.net/6.2/studio/database/documents/document-view.md)  
  Toggle to include documents and to enable inclusion of the following document related items:
  - [Include Attachments](https://docs.ravendb.net/6.2/document-extensions/attachments/what-are-attachments.md)
  - [Include Counters](https://docs.ravendb.net/6.2/document-extensions/counters/overview.md)
  - [Include Time Series](https://docs.ravendb.net/6.2/document-extensions/timeseries/overview.md)
  - [Include Revisions](https://docs.ravendb.net/6.2/document-extensions/revisions/overview.md)
  - [Include Conflicts](https://docs.ravendb.net/6.2/client-api/cluster/document-conflicts-in-client-side.md)

2. **Indexes**

- [Include Indexes](https://docs.ravendb.net/6.2/indexes/what-are-indexes.md)
  - [Remove Analyzers](https://docs.ravendb.net/6.2/indexes/using-analyzers.md)

3. **Other**

- [Include Identities](https://docs.ravendb.net/6.2/client-api/document-identifiers/working-with-document-identifiers.md)
- [Include Compare Exchange](https://docs.ravendb.net/6.2/client-api/operations/compare-exchange/overview.md)
- [Include Subscriptions](https://docs.ravendb.net/6.2/client-api/data-subscriptions/what-are-data-subscriptions.md)
- [Include Configuration and OngoingTasks](#customize-configuration-and-ongoing-tasks)

> **Note:** Importing an item that doesn't exist {#importing-an-item-that-doesn-t-exist}
>
> If any of the options is set but the source database doesn't contain any items of that type, the type will be skipped.

## 5th Step: Advanced Import Options

Click the **Advanced** button at the bottom of the options view for the following import features.

### Transform Script

In the Studio, select **database** > click **Task** tab > select **Import** > select **From RavenDB** > click the **Advanced** button at the bottom > toggle **Use Transform script**.

![Advanced Import Options - Transform Script](https://docs.ravendb.net/assets/images/import-from-ravendb-advanced-transform-script-df6cd7683350ad6ba6db2bad2689cadd.png)

- **Use Transform Script**:  
  When enabled, the supplied javascript will be executed on each document before importing the document.

Sample transform javascripts:

```javascript
// Example 1
delete this['@metadata']['@change-vector']
// The script above will delete the existing change-vector from imported documents,
// New change vectors will be generated during the import.
// This is very helpful if the data is imported from a different database-group
// and you want to avoid adding old change-vector entries to a new environment.

// Example 2
this.collection = this['@metadata']['@collection'];
// This script will create a new 'collection' property in each imported document.
```

### Customize Configuration and Ongoing Tasks

In the Studio, select **database** > click **Task** tab > select **Import** > select **From RavenDB** > click the **Advanced** button at the bottom > toggle **Customize Configuration and Ongoing Tasks**.

![Advanced Import Options - Customize Configuration and Ongoing Tasks](https://docs.ravendb.net/assets/images/import-from-ravendb-advanced-configuration-ongoing-tasks-5352ef66423d576d5ab705522464acbd.png)

1. **Ongoing tasks:**

- [Periodic Backups](https://docs.ravendb.net/6.2/studio/database/tasks/backup-task.md)
- [External replications](https://docs.ravendb.net/6.2/studio/database/tasks/ongoing-tasks/external-replication-task.md)
- [ETL Tasks - Extract, Transform, Load](https://docs.ravendb.net/6.2/server/ongoing-tasks/etl/basics.md)
- [Pull Replication Sinks](https://docs.ravendb.net/6.2/studio/database/tasks/ongoing-tasks/hub-sink-replication/overview.md)
- [Pull Replication Hubs](https://docs.ravendb.net/6.2/studio/database/tasks/ongoing-tasks/hub-sink-replication/overview.md)

2. **Other:**

- [Settings](https://docs.ravendb.net/6.2/studio/database/settings/database-settings.md)
- [Conflict Solver Configuration](https://docs.ravendb.net/6.2/client-api/operations/server-wide/modify-conflict-solver.md)
- [Revisions Configuration](https://docs.ravendb.net/6.2/document-extensions/revisions/client-api/operations/configure-revisions.md)
- [Document Expiration](https://docs.ravendb.net/6.2/server/extensions/expiration.md)
- [Client Configuration](https://docs.ravendb.net/6.2/studio/server/client-configuration.md)
- [Custom Sorters](https://docs.ravendb.net/6.2/indexes/querying/sorting.md#creating-a-custom-sorter)

3. **Connection Strings:**

- [Connection Strings](https://docs.ravendb.net/6.2/client-api/operations/maintenance/connection-strings/add-connection-string.md) used by ETL tasks to authenticate and connect to external databases will be imported.
