# Document Migration

The users can migrate a business story or dashboard using the ***Document Migration*** option from the ***Admin module.*** The entire migration task has three phases:

1. **Configuring an SFTP Server**: the SFTP server location should be similar for import and export accounts. Refer [***SFTP Settings***](https://docs.bdb.ai/administrative-settings-1/admin-panel-options/migration/sftp-settings) section to get more details on it.
2. **Export**: users can select a document from using a source user account and download it to the SFTP server.
3. **Import:** users need to open this option using a destination user account where the exported file is intended to import.

## Steps to Migrate a Document (Story)&#x20;

### Exporting a Document

* Click the ***Document*** ***Migration*** option from the ***Migration*** drop-down.​​

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2FPTRkObSYedQKnLeh30ZT%2Fimage.png?alt=media&#x26;token=f964f8fa-3283-448c-bf15-90f50ccceeba" alt=""><figcaption></figcaption></figure>

* Click the ***Export*** option from the next page that opens in the sequence.

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2FZKCTh83Ppf8RjI0h35b5%2Fimage.png?alt=media&#x26;token=9218d827-b29d-46af-9af1-07d1b1513463" alt=""><figcaption></figcaption></figure>

* A page opens with the list of documents available for export.
* Click the ***Download*** icon for the document (story/dashboard) that you want to export.

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark>*

* *If you the folders list, then the user needs to select a specific file from a folder, then only the **Download** icon gets displayed.*

* *Only **stories** and **dashboards** <mark style="color:green;">display</mark> the **download icon**; the listed <mark style="color:orange;">folders do not display the download icon</mark>.*
  {% endhint %}

* A success message appears after the download process to confirm the download of the selected file in the SFTP server.

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2FYftgJHZknmZyqvERJHjV%2Fimage.png?alt=media&#x26;token=9d73d0d7-f33c-48bb-a5d7-e893e52d4a38" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
*<mark style="color:green;">Pre-requisite for Migration:</mark> The **SFTP location should be same** for the spaces of the **source** and **destination*** ***users** to migrate the desired document.*
{% endhint %}

### Importing the Exported Document

* Sign In as a different user to the server or space where you need to import the .baf content.
* By clicking the **Import** button from the Document Migration page.

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2F1Sa1FgiBQW874aJhV8nX%2Fimage.png?alt=media&#x26;token=861d0b27-b8c2-4974-a6de-eba74b4965d4" alt=""><figcaption></figcaption></figure>

* The Migration - Document Import page opens listing all the exported  .baf files from the configured SFTP server.&#x20;
* Search for the exported .baf file.
* Click on the .baf file you want to migrate.
* The document details appear on the right side of the page.
* Click the ***Migrate*** option from the right-side panel displaying the document details.

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2Fy5uwUZpcp8Vaos0bEP9C%2Fimage.png?alt=media&#x26;token=17257bdf-a1be-42a5-bcea-ab79aa898e1e" alt=""><figcaption></figcaption></figure>

* The ***Data Connector Details***  window appears.
* Provide the required details.
* Click the ***Save*** option.    &#x20;

<figure><img src="https://2735363861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEJKqXNSvcfKLo5znn53%2Fuploads%2FQmdjvNgsqpk92VmFHCDn%2Fimage.png?alt=media&#x26;token=30cdc409-4aaa-4ea5-983e-9fd754742558" alt=""><figcaption></figcaption></figure>

* A confirmation message appears to inform the completion of the .baf file migration.
* The migrated document gets displayed on the platform homepage.

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark>*

* If the selected dashboard or story is created based on an RDBMS connector, the data connector details get displayed on the right-side panel. E.g., for the given example of the Test Story document, the following details of data source names, query service names, and data store names are displayed.

&#x20;   ![](https://859511478-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDmsjfjJBNqow7Fo97cO%2Fuploads%2Fnev9h6rams5KAcMIXwUw%2Fimage.png?alt=media\&token=8989211b-e097-4601-9a86-de140d519085)

* ***Dashboards** and **Stories** using the API data connectors/data sets or File as data connectors don’t need to provide the Connector details for document migration.*
  {% endhint %}
