Backup and restore the database


Sitefinity Cloud provides different database operations out-of-the-box. Automated backups of the database on each environment are created every minute, .bacpac files can be used to export/import a database, and databases can be restored from one environment to another on demand.
For more information about.bacpac files, see Microsoft documentation » BACPAC.

IMPORTANT: Sitefinity Cloud uses Azure SQL Database service. When you make a backup of your database, it is always made using the latest stable Enterprise Edition of SQL server. Keep this in mind when considering compatibility with your local version of SQL server you are restoring the database backup to.

Automated backups

Automated backups of the production website database are made every minute. These backups are kept for a period of 35 days, enabling you to restore your website database to a desired point in time within that period. You can request a restoration to a point in time by contacting the Sitefinity support team.

NOTE: Automated backups are not made available for development purposes. They are setup for disaster recovery and emergency data restoration purposes only. If you need a database backup for development purposes refer to the Database backups for development and On-demand database backups sections further in this article. 

Export a database for local development purposes

Automated backups of the Sitefinity Cloud environment database are made weekly. You can access these database backups and restore them locally for development and testing purposes. For further instructions on obtaining and restoring a database backup for development follow the instructions provided in the Restore a database backup locally paragraph further in this article.

Make an on-demand database export

A backup of the project’s database can be exported on demand. To do this, the developer triggers a pipeline to export a backup. This process creates a backup, which is used for development and testing purposes. 

To create a backup of the project database, perform the following:

  1. Login to Sitefinity Cloud Management Portal.
  2. Navigate to Pipelines » All » DB.
  3. In the list of available pipelines, select DB.Export pipeline.
  4. In the upper-right corner, click Run pipeline.
    A dialog appears.
  5. Expand Stages to run.
  6. Select the environments where to create a database backup.
  7. In the bottom of the dialog, click Use selected stages.
  8. Click Run.

NOTE: To protect sensitive data, use an obfuscated copy of the database.
For more information, see Setup PII data obfuscation.

Restore a database backup locally

Database backups are stored in a dedicated storage account that you can access. To restore a database backup on your local machine follow these steps:

  1. Install Azure Storage Explorer.
  2. Login with your Sitefinity Cloud Management Portal (Azure DevOps) account.
  3. Browse the blob storage account named after the website you are working on.
  4. Expand the Blob Containers item and select db-backups.
  5. Locate the folder containing database backup for the desired environment.
  6. Expand the folder and download the desired .backpac file(s).
  7. Import the .backpac file in your local environment SQL server.

Restore the database between environments

The Sitefinity Cloud environments have been isolated to create a safe mechanism for deploying and testing code changes, while content editing on the production environment remains uninterrupted. The environments use separate databases. Use this procedure to restore a database from one environment to another.

To make a copy of the latest Production database and restore it on Staging for testing or upgrade purposes, perform the following:

  1. Login to Sitefinity Cloud Management Portal.
  2. Navigate to Pipelines » All » DB.
  3. In the list of available pipelines, select DB.RestoreBetweenEnvironments pipeline.
  4. In the upper-right corner, click Run pipeline.
    A dialog opens.
  5. Select the Target environment.
    You can select any environment, except for Production or Authoring (Content Staging).
  6. Click Run.

Was this article helpful?