Cloud Backup API, REST: Policy.create
Create a new policy.
For detailed information, please see Creating a backup policy.
HTTP request
POST https://backup.api.cloud.yandex.net/backup/v1/policies
Body parameters
{
"folderId": "string",
"name": "string",
"settings": {
"compression": "string",
"format": "string",
"multiVolumeSnapshottingEnabled": true,
"preserveFileSecuritySettings": true,
"reattempts": {
"enabled": true,
"interval": {
"type": "string",
"count": "string"
},
"maxAttempts": "string"
},
"silentModeEnabled": true,
"splitting": {
"size": "string"
},
"vmSnapshotReattempts": {
"enabled": true,
"interval": {
"type": "string",
"count": "string"
},
"maxAttempts": "string"
},
"vss": {
"enabled": true,
"provider": "string"
},
"archive": {
"name": "string"
},
"performanceWindow": {
"enabled": true
},
"retention": {
"rules": [
{
"backupSet": [
"string"
],
// `settings.retention.rules[]` includes only one of the fields `maxAge`, `maxCount`
"maxAge": {
"type": "string",
"count": "string"
},
"maxCount": "string",
// end of the list of possible fields`settings.retention.rules[]`
}
],
"beforeBackup": true
},
"scheduling": {
"backupSets": [
{
"type": "string",
// `settings.scheduling.backupSets[]` includes only one of the fields `time`, `sinceLastExecTime`
"time": {
"weekdays": [
"string"
],
"repeatAt": [
{
"hour": "string",
"minute": "string"
}
],
"repeatEvery": {
"type": "string",
"count": "string"
},
"timeFrom": {
"hour": "string",
"minute": "string"
},
"timeTo": {
"hour": "string",
"minute": "string"
},
"monthdays": [
"string"
],
"includeLastDayOfMonth": true,
"months": [
"string"
],
"type": "string"
},
"sinceLastExecTime": {
"delay": {
"type": "string",
"count": "string"
}
},
// end of the list of possible fields`settings.scheduling.backupSets[]`
}
],
"enabled": true,
"maxParallelBackups": "string",
"randMaxDelay": {
"type": "string",
"count": "string"
},
"scheme": "string",
"weeklyBackupDay": "string"
},
"cbt": "string",
"fastBackupEnabled": true,
"quiesceSnapshottingEnabled": true
}
}
Field | Description |
---|---|
folderId | string Required. Folder ID. The maximum string length in characters is 50. |
name | string Required. Policy name. The maximum string length in characters is 50. |
settings | object Required. Set of policy settings |
settings. compression |
string Required. Archive compression level. Compression rate of the backups. |
settings. format |
string Required. Format of the Acronis backup archive. Format of the backup in policy. For backup locations that can be browsed with a file manager, the backup format determines the number of files and their extension.
|
settings. multiVolumeSnapshottingEnabled |
boolean (boolean) If true, snapshots of multiple volumes will be taken simultaneously. |
settings. preserveFileSecuritySettings |
boolean (boolean) If true, the file security settings will be preserved. |
settings. reattempts |
object Required. Configuration of retries on recoverable errors during the backup operations like reconnection to destination. No attempts to fix recoverable errors will be made if retry configuration is not set. |
settings. reattempts. enabled |
boolean (boolean) If true, enables retry on errors. |
settings. reattempts. interval |
object Required. An interval between retry attempts. |
settings. reattempts. interval. type |
string Required. A type of the interval. |
settings. reattempts. interval. count |
string (int64) The amount of value specified in Value must be greater than 0. |
settings. reattempts. maxAttempts |
string (int64) Max number of retry attempts. Operation will be considered as failed when max number of retry attempts is reached. Value must be greater than 0. |
settings. silentModeEnabled |
boolean (boolean) If true, a user interaction will be avoided when possible. Equals to false if value is not specified. |
settings. splitting |
object Required. Determines the size to split backups on. Splitting is not performed if value is not specified. |
settings. splitting. size |
string (int64) The size of split backup file in bytes. |
settings. vmSnapshotReattempts |
object Required. Configuration of retries on errors during the creation of the virtual machine snapshot. No attempts to fix recoverable errors will be made if retry configuration is not set. |
settings. vmSnapshotReattempts. enabled |
boolean (boolean) If true, enables retry on errors. |
settings. vmSnapshotReattempts. interval |
object Required. An interval between retry attempts. |
settings. vmSnapshotReattempts. interval. type |
string Required. A type of the interval. |
settings. vmSnapshotReattempts. interval. count |
string (int64) The amount of value specified in Value must be greater than 0. |
settings. vmSnapshotReattempts. maxAttempts |
string (int64) Max number of retry attempts. Operation will be considered as failed when max number of retry attempts is reached. Value must be greater than 0. |
settings. vss |
object Required. Settings for the Volume Shadow Copy Service (VSS) provider. If not set, no VSS provider is used. Settings for Volume Shadow Copy Services which allows to notify VSS-aware applications that backup is about to start. This will ensure the consistent state of all data used by the applications. |
settings. vss. enabled |
boolean (boolean) If true, the VSS will be enabled. |
settings. vss. provider |
string Required. A type of VSS provider to use in backup. |
settings. archive |
object The archive properties. |
settings. archive. name |
string The name of the generated archive. The name may use the following variables: |
settings. performanceWindow |
object Required. Time windows for performance limitations of backup and storage maintenance operations. |
settings. performanceWindow. enabled |
boolean (boolean) If true, the time windows will be enabled. |
settings. retention |
object Required. Configuration of backup retention rules. |
settings. retention. rules[] |
object A list of retention rules. |
settings. retention. rules[]. backupSet[] |
string A list of backup sets where rules are effective. |
settings. retention. rules[]. maxAge |
object settings.retention.rules[] includes only one of the fields maxAge , maxCount |
settings. retention. rules[]. maxAge. type |
string Required. A type of the interval. |
settings. retention. rules[]. maxAge. count |
string (int64) The amount of value specified in Value must be greater than 0. |
settings. retention. rules[]. maxCount |
string (int64) settings.retention.rules[] includes only one of the fields maxAge , maxCount |
settings. retention. beforeBackup |
boolean (boolean) If true, retention rules will be applied before backup is finished. |
settings. scheduling |
object Required. Configuration of the backup schedule. |
settings. scheduling. backupSets[] |
object Required. A list of schedules with backup sets that compose the whole scheme. Must contain at least one element. |
settings. scheduling. backupSets[]. type |
string BackupSet type -- one of incr, full, differential or auto. if custom scheme is used the BackupSet type should be specified |
settings. scheduling. backupSets[]. time |
object settings.scheduling.backupSets[] includes only one of the fields time , sinceLastExecTime |
settings. scheduling. backupSets[]. time. weekdays[] |
string Days in a week to perform a backup. |
settings. scheduling. backupSets[]. time. repeatAt[] |
object Time to repeat the backup. |
settings. scheduling. backupSets[]. time. repeatAt[]. hour |
string (int64) Hours. |
settings. scheduling. backupSets[]. time. repeatAt[]. minute |
string (int64) Minutes. |
settings. scheduling. backupSets[]. time. repeatEvery |
object Frequency of backup repetition. |
settings. scheduling. backupSets[]. time. repeatEvery. type |
string Required. A type of the interval. |
settings. scheduling. backupSets[]. time. repeatEvery. count |
string (int64) The amount of value specified in Value must be greater than 0. |
settings. scheduling. backupSets[]. time. timeFrom |
object The start time of the backup time interval. |
settings. scheduling. backupSets[]. time. timeFrom. hour |
string (int64) Hours. |
settings. scheduling. backupSets[]. time. timeFrom. minute |
string (int64) Minutes. |
settings. scheduling. backupSets[]. time. timeTo |
object The end time of the backup time interval. |
settings. scheduling. backupSets[]. time. timeTo. hour |
string (int64) Hours. |
settings. scheduling. backupSets[]. time. timeTo. minute |
string (int64) Minutes. |
settings. scheduling. backupSets[]. time. monthdays[] |
string (int64) Days in a month to perform a backup. Allowed values are from 1 to 31. |
settings. scheduling. backupSets[]. time. includeLastDayOfMonth |
boolean (boolean) If set to true, last day of month will activate the policy. |
settings. scheduling. backupSets[]. time. months[] |
string (int64) Set of values. Allowed values form 1 to 12. |
settings. scheduling. backupSets[]. time. type |
string Required. Possible types: |
settings. scheduling. backupSets[]. sinceLastExecTime |
object settings.scheduling.backupSets[] includes only one of the fields time , sinceLastExecTime |
settings. scheduling. backupSets[]. sinceLastExecTime. delay |
object Required. The interval between backups. |
settings. scheduling. backupSets[]. sinceLastExecTime. delay. type |
string Required. A type of the interval. |
settings. scheduling. backupSets[]. sinceLastExecTime. delay. count |
string (int64) The amount of value specified in Value must be greater than 0. |
settings. scheduling. enabled |
boolean (boolean) If true, the backup schedule will be enabled. |
settings. scheduling. maxParallelBackups |
string (int64) Max number of backup processes allowed to run in parallel. Unlimited if not set. |
settings. scheduling. randMaxDelay |
object Required. Configuration of the random delay between the execution of parallel tasks. |
settings. scheduling. randMaxDelay. type |
string Required. A type of the interval. |
settings. scheduling. randMaxDelay. count |
string (int64) The amount of value specified in Value must be greater than 0. |
settings. scheduling. scheme |
string Required. A backup scheme. Available values: Scheme of backups.
|
settings. scheduling. weeklyBackupDay |
string Required. A day of week to start weekly backups. |
settings. cbt |
string Required. A configuration of Changed Block Tracking (CBT). |
settings. fastBackupEnabled |
boolean (boolean) If true, determines whether a file has changed by the file size and timestamp. Otherwise, the entire file contents are compared to those stored in the backup. |
settings. quiesceSnapshottingEnabled |
boolean (boolean) If true, a quiesced snapshot of the virtual machine will be taken. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": true,
"metadata": "object",
// includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": "object",
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
createdAt | string (date-time) Creation timestamp. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
createdBy | string ID of the user or service account who initiated the operation. |
modifiedAt | string (date-time) The time when the Operation resource was last modified. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
done | boolean (boolean) If the value is |
metadata | object Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
error | object The error result of the operation in case of failure or cancellation. includes only one of the fields error , response |
error. code |
integer (int32) Error code. An enum value of google.rpc.Code. |
error. message |
string An error message. |
error. details[] |
object A list of messages that carry the error details. |
response | object includes only one of the fields error , response The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is the standard Create/Update, the response should be the target resource of the operation. Any method that returns a long-running operation should document the response type, if any. |