---
title: "Creates a backup policy."
method: POST
path: "/BackupRestore/BackupPolicies/$/Create"
tags: ["BackupRestore"]
---

# Creates a backup policy.

`POST /BackupRestore/BackupPolicies/$/Create`

Creates a backup policy which can be associated later with a Service Fabric application, service or a partition for periodic backup.

## Query parameters

- `api-version` '6.4', required
- `timeout` integer

## Request body

- BackupPolicyDescription — Describes a backup policy for configuring periodic backup.
  - `Name` string, required — The unique name identifying this backup policy.
  - `AutoRestoreOnDataLoss` boolean, required — Specifies whether to trigger restore automatically using the latest available backup in case the partition experiences a data loss event.
  - `MaxIncrementalBackups` integer, required — Defines the maximum number of incremental backups to be taken between two full backups. This is just the upper limit. A full backup may be taken before specified number of incremental backups are completed in one of the following conditions - The replica has never taken a full backup since it has become primary, - Some of the log records since the last backup has been truncated, or - Replica passed the MaxAccumulatedBackupLogSizeInMB limit.
  - `Schedule` BackupScheduleDescription, required — Describes the backup schedule parameters.
    - `ScheduleKind` 'Invalid' | 'TimeBased' | 'FrequencyBased', required — The kind of backup schedule, time based or frequency based.
  - `Storage` BackupStorageDescription, required — Describes the parameters for the backup storage.
    - `StorageKind` 'Invalid' | 'FileShare' | 'AzureBlobStore', required — The kind of backup storage, where backups are saved.
    - `FriendlyName` string — Friendly name for this backup storage.
  - `RetentionPolicy` RetentionPolicyDescription — Describes the retention policy configured.
    - `RetentionPolicyType` 'Basic' | 'Invalid', required — The type of retention policy. Currently only "Basic" retention policy is supported.

## Response `201`

A successful operation returns 201 status code and creates a new backup policy.

## Other responses

- `default` — The detailed error response.

---

[API](https://skmtc.net/azure/apis/service-fabric-client-apis.md) · [All operations](https://skmtc.net/azure/apis/service-fabric-client-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/service-fabric-client-apis/versions/6df9f2f4d542/schema)
