Loading...
Area: Episerver Customer-Centric DXP

Export database

Recommendations [hide]

This topic describes how to export a database for each environment, follow the retention hours, and use the API. See also Export the database to bacpac file using PaaS portal to use the UI.

You can export the CMS or Commerce database to a bacpac file using the API or using the PaaS portal.

When you export a database, it triggers an export job for the requested database. The export job copies the requested database from the requested environment to a new database in the Integration environment. Next, it starts exporting to a bacpac file from the copied database and stores the bacpac in the bacpacs container in the storage of the General environment. Using the General environment reduces the impact on the performance of the requested environment.

If a project does not have a General environment, you should migrate the database using a General environment resource group migration before starting an export job.

Note: The Export Database process can take from a few hours to several days (in extreme cases). You can export only one database at a time.

Export the database to bacpac file using API 

Operations

Export database

Request

POST api/v1.0/projects/{projectId}/environments/{environment}/databases/{databaseName}/exports

Parameters

Name

Type

Description

databaseName

string

The name of the requested database.

Valid names: epicmsepicommerce

environment

string

The name of the environment of the requested database

projectId

Guid

The identifier of the project of the requested database

Body

{
  retentionHours : 12             
}

Name

Type

Description

retentionHours

int

Total hours that the bacpac is retained in the bacpacs container

Default value: 24

Response

{
  Id           : guid,
  projectId    : guid,
  environment  : string,
  databaseName : string,
  status       : string,
  downloadLink : string                                                         
}

Get export database

This API gets the information about the export job that is triggered by an export database operation.

Request

GET api/v1.0/projects/{projectId}/environments/{environment}/databases/{databaseName}/exports/id

Parameter

Name

Type

Description

id

Guid

The identifier of the export job

Response

(Same as a response for Export database operation.)

{
  Id           : guid,
  projectId    : guid,
  environment  : string,
  databaseName : string,
  status       : string,
  downloadLink : string                                                         
}

Test tools

  • Postman
  • Epicloud
    • Start-EpiDatabaseExport
    • Get-EpiDatabaseExport
  • Swagger
    • swagger/ui/index
Do you find this information helpful? Please log in to provide feedback.

Last updated: Jul 09, 2020

Recommendations [hide]