Backup and restore the database

Overview

Sitefinity Cloud provides several ways to restore the project database to a desired point in time - Automated backups of the production database, automated weekly backups for development purposes and manual on-demand backups.

IMPORTANT: Sitefinity Cloud uses Azure SQL Database service. When you make a backup of your database, it will always be 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. 

Database backups for development

Automated backups of the Staging and Production 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 backup

A backup of the project’s database can be acquired on demand. To do this, the developer triggers a pipeline to acquire a backup. This process creates a backup of the database 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.AcquireBackup 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’re working on.
  4. Expand the Blob Containers item and select db-backups
  5. Locate the folder containing database backup for the desired environment.
    AzureStrgExplorerDBBUsFolders
  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 from between environments

The Staging and Production 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 staging or authoring to other environments that you may have.

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 appears.
  5. Select the Target environment.
    You can select any environment, except for Production or Authoring (Content Staging).
  6. Click Run.

Was this article helpful?