Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Backup
    • All guides
    • Activating the service
    • Restoring the Cloud Backup agent
    • Viewing operations on service resources
    • Limiting RAM usage by the Cloud Backup agent
    • Viewing backup statistics
    • Setting up Monium alerts
    • Overview
    • Backup policies
    • Backups
    • Interaction with an antivirus
    • Cloud Backup agent
    • Quotas
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • Troubleshooting

In this article:

  • Storing backups
  • Backup policy specification
  • Use cases
  1. Concepts
  2. Backup policies

Backup policies

Written by
Yandex Cloud
Updated at July 29, 2026
View in Markdown
  • Storing backups
  • Backup policy specification
  • Use cases

Resource backups are created in Cloud Backup automatically according to backup policies.

You can start creating the policies after you activate Cloud Backup.

Note

You can create or update a policy using the Yandex Cloud management console, Terraform, or a JSON specification via the Yandex Cloud CLI or API.

The Yandex Cloud management console does not support some parameters from the JSON specification for policies.

After activation, the system automatically creates the following backup policies:

  • Default daily: Daily incremental backup with the last 15 backups retained.
  • Default weekly: Weekly incremental backup with the last 15 backups retained.
  • Default monthly: Monthly incremental backup with the last 15 backups retained.

By default, resources in Cloud Backup are not linked to any backup policies. To start creating backups, link your resource to one or more policies.

The backup policy specifies:

  • Backup type: Full or incremental. For more information, see Backup types.

    Note

    If you are using a policy with the fastBackupEnabled option and have run an antivirus scan prior to creating an incremental backup, the backup time may increase significantly. Read more in Interaction with an antivirus.

  • Schedule type and settings:

    • Fixed schedule: Backup frequency in hours, days, weeks, or months. Use UTC±00:00 time.
    • Interval between backups: Interval, in hours or days, between the end of the previous backup and the start of the new one.
  • Backup retention settings.

Note

Backups are created based on the local time of the resource. There may be a slight delay from the schedule depending on how loaded the service currently is.

Storing backupsStoring backups

You can set up backup storage for the policy. For each resource linked to a policy, you can store:

  • All backups created under this policy.
  • Only the last several backups.
  • Only the backups younger than a certain age, e.g., those created during the last few days.

The settings apply to all resources linked to the policy.

Note

You cannot restore a VM backup to a server or a server backup to a VM. However, you can restore an external server backup to a Yandex BareMetal server.

If you make changes to the backup retention rules, by default they will take effect as soon as you create another backup. For more on the backup retention rule settings, see the next section.

Backup policy specificationBackup policy specification

In Cloud Backup, you can create or update backup policies based on a specification in JSON format by using the Yandex Cloud command line or making an API request.

The complete backup policy specification for Cloud Backup is detailed below. You can also view the current specification version in the REST API reference.

{
  "compression": "string",
  "format": "string",
  "multiVolumeSnapshottingEnabled": bool,
  "preserveFileSecuritySettings": bool,
  "runLater": bool,
  "sectorBySector": bool,
  "validationEnabled": bool,
  "lvmSnapshottingEnabled": bool,
  "fileFilters": {
    "exclusionMasks": [
      "string"
    ],
    "inclusionMasks": [
      "string"
    ]
  },
  "reattempts": {
    "enabled": bool,
    "interval": {
      "type": "string",
      "count": "string"
    },
    "maxAttempts": "string"
  },
  "silentModeEnabled": bool,
  "splitting": {
    "size": "string"
  },
  "vmSnapshotReattempts": {
    "enabled": bool,
    "interval": {
      "type": "string",
      "count": "string"
    },
    "maxAttempts": "string"
  },
  "vss": {
    "enabled": bool,
    "provider": "string"
  },
  "archive": {
    "name": "string"
  },
  "performanceWindow": {
    "enabled": bool
  },
  "retention": {
    "rules": [
      {
        "backupSet": [
          "string"
        ],
        "maxAge": {
          "type": "string",
          "count": "string"
        },
        "maxCount": "string",
      }
    ],
    "beforeBackup": bool
  },
  "scheduling": {
    "backupSets": [
      {
        "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"
          ],
          "months": [
            "string"
          ],
          "type": "string"
        },
        "sinceLastExecTime": {
          "delay": {
            "type": "string",
            "count": "string"
          }
        },
      }
    ],
    "enabled": bool,
    "maxParallelBackups": "string",
    "randMaxDelay": {
      "type": "string",
      "count": "string"
    },
    "scheme": "string",
    "weeklyBackupDay": "string"
  },
  "cbt": "string",
  "fastBackupEnabled": bool,
  "quiesceSnapshottingEnabled": bool,
  "prePostCommands": [
    {
      "cmd": "string",
      "args": "string",
      "enabled": bool,
      "stopOnError": bool,
      "type": "string",
      "wait": bool,
      "workdir": "string"
    }
  ]
}

Specification description:

Attribute Description Possible values
compression Backup compression ratio.
  • COMPRESSION_UNSPECIFIED: Not specified.
  • NORMAL: Standard compression ratio.
  • HIGH: High compression ratio.
  • MAX: Maximum compression ratio.
  • OFF: Disabled.
format Backup format.
  • FORMAT_UNSPECIFIED: Not specified.
  • VERSION_11: Deprecated format, not recommended.
  • VERSION_12: Recommended format for high-speed backup and recovery.
  • AUTO: Automatic format selection. Version 12 is used by default unless you are creating incremental backups for the images created in other versions.
multiVolumeSnapshottingEnabled Backing up multiple volumes at the same time.
  • true: Enabled.
  • false: Disabled.
preserveFileSecuritySettings Retaining file security settings. The parameter is no longer supported.
  • true: Enabled.
  • false: Disabled.
runLater If the resource was Stopped during a scheduled backup, all skipped backup jobs will be executed after that resource starts.
  • true: Enabled.
  • false: Disabled.
sectorBySector Sector-by-sector backup. Backs up all disk or volume sectors, including empty areas and unallocated space. For disks with unsupported file systems, this mode applies automatically. You cannot recover app data from a backup like that.
  • true: Enabled.
  • false: Disabled.
validationEnabled Checks the possibility of recovering data from the new backup. During procedure, a checksum is calculated for each section available for recovery, so it can take a while.
  • true: Enabled.
  • false: Disabled.
lvmSnapshottingEnabled Uses LVM to create a volume snapshot. If the snapshot cannot be created using LVM, it will be created using the Cloud Backup agent.
  • true: Enabled.
  • false: Disabled.
cbt Changed Block Tracking (configuration for tracking backup contents).
  • CHANGED_BLOCK_TRACKING_UNSPECIFIED: Not specified.
  • USE_IF_ENABLED: Use if enabled.
  • ENABLE_AND_USE: Enable and use.
  • DO_NOT_USE: Do not use.
fastBackupEnabled Fast backup: setting for tracking changes to files. When enabled, file changes are detected by the file size and timestamp. When disabled, files are checked for changes by comparing their contents to backed up files.
  • true: Enabled.
  • false: Disabled.
quiesceSnapshottingEnabled Using quiescing when creating backups. The parameter is no longer supported.
  • true: Enabled.
  • false: Disabled.

Attribute sections with multiple nested values.

reattempts
vmSnapshotReattempts
vss
retention
scheduling
fileFilters
prePostCommands

Setting up backup reattempts in the event of failures.

Attribute Description Possible values
reattempts.enabled Retry creating a backup if a noncritical error occur (e.g., failure to connect to a target disk).
  • true: Enabled.
  • false: Disabled.
reattempts.interval.type Unit of time used to set the reattempt interval.
  • TYPE_UNSPECIFIED: Not specified.
  • SECONDS
  • MINUTES
  • HOURS
  • DAYS
  • WEEKS
  • MONTHS
reattempts.interval.count Interval between reattempts. Integer
reattempts.maxAttempts Maximum number of reattempts. If reached, the operation is considered failed. Integer
silentModeEnabled Silent mode to reduce the number of user interactions wherever possible. Disabled by default.
  • true: Enabled.
  • false: Disabled.
splitting.size Splitting a backup into volumes of a preset size in bytes. If no value is specified, a backup is saved as a single file. Integer

Configuring backup reattempts in the event of failure.

Attribute Description Possible values
vmSnapshotReattempts.enabled Retry creating a backup if errors occur.
  • true: Enabled.
  • false: Disabled.
vmSnapshotReattempts.interval.type Unit of time used to set the reattempt interval.
  • TYPE_UNSPECIFIED: Not specified.
  • SECONDS
  • MINUTES
  • HOURS
  • DAYS
  • WEEKS
  • MONTHS, months
vmSnapshotReattempts.interval.count Interval between reattempts. Integer
vmSnapshotReattempts.maxAttempts Maximum number of reattempts. If reached, the operation is considered failed. Integer

Volume Shadow Copy Service (VSS) setup. The service notifies applications with VSS support of the upcoming backup start. The applications save information from memory to disk, which ensures data integrity during backup.

Attribute Description Possible values
vss.enabled Enable VSS.
  • true: Enabled.
  • false: Disabled.
vss.provider Choosing a VSS provider.
  • VSS_PROVIDER_UNSPECIFIED: Not specified.
  • NATIVE: Native VSS provider.
  • TARGET_SYSTEM_DEFINED: VSS provider defined in the target system.
archive.name Name of the archive being created. String that may contain the following variables: [Machine Name], [Plan ID], [Plan Name], [Unique ID], and [Virtualization Server Type].
performanceWindow Enable a performance window to limit the impact of backups and storage maintenance on performance.
  • true: Enabled.
  • false: Disabled.

Setting up rules for storing backups. The maxAge and maxCount attributes are mutually exclusive, i.e., the use of one makes it impossible to use the other.

Attribute Description Possible values
retention.rules.backupSet Set of backups for which the retention settings are specified. String
retention.rules.maxAge.type Setting a backup retention rule to delete outdated backups depending on their age in specified time units.
  • TYPE_UNSPECIFIED: Not specified.
  • SECONDS
  • MINUTES
  • HOURS
  • DAYS
  • WEEKS
  • MONTHS, months
retention.rules.maxAge.count Maximum backup retention period in time units set by the maxAge.type attribute. Integer
retention.rules.maxCount Setting a backup retention rule to delete outdated backups depending on the specified maximum number of stored backups. Integer
retention.beforeBackup Applying backup retention rules before the end of the backup. When creating a policy by default or via the management console, the beforeBackup=false rule is set. The backup retention rule settings will take effect as soon as another backup is created.
  • true: Enabled.
  • false: Disabled.

Setting up a backup schedule. The time (based on preset time) and sinceLastExecTime (with preset interval between backups) attributes are mutually exclusive, i.e., the use of one makes it impossible to use the other.

Attribute

Description

Possible values

scheduling.backupSets.
time.weekdays

Days of the week to create backups on. You can specify multiple values separated by commas.

  • DAY_UNSPECIFIED: Not specified.
  • MONDAY
  • TUESDAY
  • WEDNESDAY
  • THURSDAY
  • FRIDAY
  • SATURDAY
  • SUNDAY

scheduling.backupSets.
time.repeatAt.hour

Time to repeat backups at: hours.

Integer from 0 to 23.

scheduling.backupSets.
time.repeatAt.minute

Time to repeat backups at: minutes.

Integer from 0 to 59.

scheduling.backupSets.
time.repeatEvery.type

Units of time used to set the repeat backup interval.

  • TYPE_UNSPECIFIED: Not specified.
  • SECONDS
  • MINUTES
  • HOURS
  • DAYS
  • WEEKS
  • MONTHS, months

scheduling.backupSets.
time.repeatEvery.count

Backup reattempt interval in units set by the repeatEvery.type attribute.

Integer.

scheduling.backupSets.
time.timeFrom.hour

Start time for the backup interval (from): hours.

Integer from 0 to 23.

scheduling.backupSets.
time.timeFrom.minute

Start time for the backup interval (from): minutes.

Integer from 0 to 59.

scheduling.backupSets.
time.timeTo.hour

End time for the backup interval (to): hours.

Integer from 0 to 23.

scheduling.backupSets.
time.timeTo.minute

End time for the backup interval (to): minutes.

Integer from 0 to 59.

scheduling.backupSets.
time.monthdays

Day of the month to create backups on. You can specify multiple values separated by commas.

Integer from 1 to 31.

scheduling.backupSets.
time.includeLastDayOfMonth

Making backups on the last day of each month.

Warning

If set to true, this setting overrides other schedule settings: days of the week, days of the month, etc.

  • true: Enabled.
  • false: Disabled.

scheduling.backupSets.
time.months

Months to create backups in. You can specify multiple values separated by commas.

Integer from 1 to 12.

scheduling.backupSets.
time.type

Backup frequency.

  • REPEATE_PERIOD_UNSPECIFIED: Not specified.
  • HOURLY
  • DAILY
  • WEEKLY
  • MONTHLY

scheduling.backupSets.
sinceLastExecTime.delay.type

Units of time used to set the interval between backups.

  • TYPE_UNSPECIFIED: Not specified.
  • SECONDS
  • MINUTES
  • HOURS
  • DAYS
  • WEEKS
  • MONTHS, months

scheduling.backupSets.
sinceLastExecTime.delay.count

Interval between backups in time units set by the delay.type attribute.

Integer.

scheduling.enabled

Scheduled backup.

  • true: Enabled.
  • false: Disabled.

scheduling.maxParallelBackups

Maximum number of parallel backups; unlimited if no value is specified.

Integer.

scheduling.randMaxDelay.type

Units of time used to set the maximum delay before running parallel jobs.

  • TYPE_UNSPECIFIED: Not specified.
  • SECONDS
  • MINUTES
  • HOURS
  • DAYS
  • WEEKS
  • MONTHS, months

scheduling.randMaxDelay.count

Maximum delay before running parallel jobs in time units set by the randMaxDelay.type attribute. The delay is determined randomly but it may not exceed the value set here.

Integer.

scheduling.scheme

Backup schedule scheme.

  • SCHEME_UNSPECIFIED: Not specified.
  • SIMPLE: Simple.
  • ALWAYS_FULL: Always full.
  • ALWAYS_INCREMENTAL: Always incremental.
  • WEEKLY_INCREMENTAL: Create an incremental backup every week.
  • WEEKLY_FULL_DAILY_INCREMENTAL: Create an incremental backup every day and a full one weekly.
  • CUSTOM: Custom.
  • CDP: Continuous Data Protection.

scheduling.weeklyBackupDay

Day of the week for the weekly backup.

Integer from 1 to 7

Setting up filters. You can exclude files and folders from backups or, conversely, create backups of only specific elements of the file system.

To include or exclude files, add some criteria, e.g., file names, paths, or masks. * and ? wildcards are supported. Use a new line for each criterion. Criteria are case-insensitive.

Exclusion filters take precedence over inclusion filters.

Attribute Description Value (example)
exclusionMasks Criterion for files to exclude from the backup. /tmp
inclusionMasks Criterion for files to include into the backup. /home/user*

Setting actions Cloud Backup will perform before and after the backup.

Attribute Description Value (example)
cmd Command or path to the executable file that needs to be executed (run). /usr/bin/myapp
args Command line parameters to apply when executing the command (running the file). -d -rw
enabled Enabling or disabling the command execution (running the file).
  • true: Enabled.
  • false: Disabled.
stopOnError Stopping the backup if there is an error during command execution (running the file).
  • true: Stop the backup.
  • false: Not stop the backup.
type Time of command execution (running the file).
  • COMMAND_TYPE_UNSPECIFIED: Not specified.
  • PRE_COMMAND: Execute the command (run the file) prior to starting the backup.
  • POST_COMMAND: Execute the command (run the file) after the backup completes.
  • PRE_DATA_COMMAND: Execute the command (run the file) immediately before data capture (taking a snapshot).
  • POST_DATA_COMMAND: Execute the command (run the file) immediately after data capture (taking a snapshot).
You can add no more than one command of each type per policy: PRE_COMMAND, POST_COMMAND, PRE_DATA_COMMAND, and POST_DATA_COMMAND.

The PRE_DATA_COMMAND and POST_DATA_COMMAND commands run in immediate proximity to the snapshot, while PRE_COMMAND and POST_COMMAND run at the very beginning and end of the entire backup process.
wait Waiting for the command execution (file running) to complete before starting the backup.
  • true: Wait for the command to complete.
  • false: Not wait for the command to complete.
workdir Working directory to execute the command (run the file) in. /etc/myapp/

Use casesUse cases

  • Associating a Yandex Cloud Backup policy with a VM automatically

Useful linksUseful links

  • Creating a backup policy
  • Linking a resource to a backup policy
  • Detach a backed up resource from a backup policy
  • Updating a backup policy
  • Getting information about a backup policy

Was the article helpful?

Previous
VMs and servers outside Yandex Cloud
Next
Backups
© 2026 Direct Cursus Technology L.L.C.