---
title: "How to export Binary Files"
canonical: "https://onesaitplatform.refined.site/space/DOCT/2221606735/How%20to%20export%20Binary%20Files"
format: markdown
---
> ℹ️ Available from version 3.1.0-kickoff

As of version 3.1.0, the possibility of exporting/importing the Binary Files stored in the MongoDB GridFS between Platform instances has been added to the [Export/Import Tool](https://onesaitplatform.atlassian.net/wiki/pages/createpage.action?spaceKey=doct&title=Export-Import%20Tool--&linkCreation=true&fromPageId=2221606735).

## Script generation

With an Administrator role we go to the source environment (where we have the data of the files that we want to migrate) and access the menu option **DEV TOOLS > Export & Import Environment Tool**. This tool allows us to perform data migration (tango of the ConfigDB as the RealTimeDB) between environments.

To generate the MongoDB export and import scripts, we go to the **EXPORT **tab and select the **BinaryFiles Export** option:

![image](media://95eaa1a3-80de-4ff8-a806-f6c256bae82b)

We select the files we want to migrate and enter the Mongo username and password.

> ℹ️ By default the MongoDB username and password in the installations is: **platformadmin/0pen-platf0rm-2018!**

Then we select the **START EXPORT** button and a zip containing the data export and import files will be downloaded:

![image](media://b51bea1a-06b8-491f-8ca6-047fd5c95083)

## Export

To carry out the export, enter the RealTimeDB container in the source environment and execute the **export.sh** script on the **\tmp** directory, which will generate the corresponding files with the data of the files selected for export.

> ℹ️ It is recommended to first map the **\tmp** directory of the container to the **\datadrive\ onesaitplatform\mongo\export** directory of the machine. So that the access to the files will be easier.

## Import

To import the exported data, access the RealTimeDB container of the destination environment and execute the **import.sh**  script on the  **\tmp** directory

> ℹ️ Keep in mind that this script is only migrating the files stored in Mongo. In order for the files to appear in the Controlpanel it is necessary to carry out the migration of the BinaryFiles first.