Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • 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
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Terraform in Yandex Cloud
  • Getting started
  • Solution library
    • Overview
    • Release notes
          • backup_policy

In this article:

  • Example usage
  • Schema
  • Optional
  • Read-Only
  • Nested Schema for file_filters
  • Nested Schema for reattempts
  • Nested Schema for retention
  • Nested Schema for retention.rules
  • Nested Schema for scheduling
  • Nested Schema for scheduling.backup_sets
  • Nested Schema for scheduling.backup_sets.execute_by_time
  • Nested Schema for vm_snapshot_reattempts
  1. Terraform reference
  2. Resources
  3. Cloud Backup
  4. Data Sources
  5. backup_policy

yandex_backup_policy (Data Source)

Written by
Yandex Cloud
Updated at October 2, 2025
  • Example usage
  • Schema
    • Optional
    • Read-Only
    • Nested Schema for file_filters
    • Nested Schema for reattempts
    • Nested Schema for retention
    • Nested Schema for retention.rules
    • Nested Schema for scheduling
    • Nested Schema for scheduling.backup_sets
    • Nested Schema for scheduling.backup_sets.execute_by_time
    • Nested Schema for vm_snapshot_reattempts

Get information about a Yandex Backup Policy. For more information, see the official documentation.

Warning

One of policy_id or name should be specified.

Warning

In case you use name, an error will occur if two policies with the same name exist. In this case, rename the policy or use the policy_id.

Example usageExample usage

//
// Get information about existing Cloud Backup Policy
//
data "yandex_backup_policy" "my_policy" {
  name = "some_policy_name"
}

output "my_policy_name" {
  value = data.yandex_backup_policy.my_policy.name
}

SchemaSchema

OptionalOptional

  • name (String) The resource name.
  • policy_id (String) ID of the policy.

Read-OnlyRead-Only

  • archive_name (String) The name of generated archives. Default [Machine Name]-[Plan ID]-[Unique ID]a.
  • cbt (String) Configuration of Changed Block Tracking. Available values are: USE_IF_ENABLED, ENABLED_AND_USE, DO_NOT_USE. Default DO_NOT_USE.
  • compression (String) Archive compression level. Affects CPU. Available values: NORMAL, HIGH, MAX, OFF. Default: NORMAL.
  • created_at (String) The creation timestamp of the resource.
  • enabled (Boolean) If this field is true, it means that the policy is enabled.
  • fast_backup_enabled (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.
  • file_filters (List of Object) File filters to specify masks of files to backup or to exclude of backuping. (see below for nested schema)
  • folder_id (String) The folder identifier that resource belongs to. If it is not provided, the default provider folder-id is used.
  • format (String) Format of the backup. It's strongly recommend to leave this option empty or AUTO. Available values: AUTO, VERSION_11, VERSION_12.
  • id (String) The ID of this resource.
  • lvm_snapshotting_enabled (Boolean) LVM will be used to create the volume snapshot. If LVM fails to create a snapshot (for example, because there is not enough free space), the software will create the snapshot itself.
  • multi_volume_snapshotting_enabled (Boolean) If true, snapshots of multiple volumes will be taken simultaneously. Default true.
  • performance_window_enabled (Boolean) Time windows for performance limitations of backup. Default false.
  • reattempts (Set of Object) Amount of reattempts that should be performed while trying to make backup at the host. (see below for nested schema)
  • retention (Set of Object) Retention policy for backups. Allows to setup backups lifecycle. (see below for nested schema)
  • scheduling (Set of Object) Schedule settings for creating backups on the host. (see below for nested schema)
  • sector_by_sector (Boolean) A sector-by-sector backup of a disk or volume creates a backup copy of all sectors of the disk or volume, including those that do not contain data. Therefore, the size of such a backup copy will be equal to the size of the original disk or volume.
  • silent_mode_enabled (Boolean) If true, a user interaction will be avoided when possible. Default true.
  • splitting_bytes (String) Determines the size to split backups. It's better to leave this option unchanged. Default 9223372036854775807.
  • updated_at (String) The update timestamp of the resource.
  • validation_enabled (Boolean) Validation is a time-consuming process, even with incremental or differential backups of small amounts of data. This is because not only the data physically contained in the backup copy is verified, but all data restored when it is selected. This option requires access to previously created backup copies.
  • vm_snapshot_reattempts (Set of Object) Amount of reattempts that should be performed while trying to make snapshot. (see below for nested schema)
  • vss_provider (String) Settings for the volume shadow copy service. Available values are: NATIVE, TARGET_SYSTEM_DEFINED. Default NATIVE.

Nested Schema for Nested Schema for file_filters

Read-Only:

  • exclusion_masks (List of String) Do not backup files that match the following criteria.

  • inclusion_masks (List of String) Backup only files that match the following criteria.

Nested Schema for Nested Schema for reattempts

Read-Only:

  • enabled (Boolean) Enable flag. Default true.

  • interval (String) Retry interval. See interval_type for available values. Default: 5m.

  • max_attempts (Number) Maximum number of attempts before throwing an error. Default 5.

Nested Schema for Nested Schema for retention

Read-Only:

  • after_backup (Boolean) Defines whether retention rule applies after creating backup or before.

  • rules (Block Set) A list of retention rules. (see below for nested schema)

Nested Schema for Nested Schema for retention.rules

Read-Only:

  • max_age (String) Deletes backups that older than max_age. Exactly one of max_count or max_age should be set.

  • max_count (Number) Deletes backups if it's count exceeds max_count. Exactly one of max_count or max_age should be set.

  • repeat_period (List of String) Possible types: REPEATE_PERIOD_UNSPECIFIED, HOURLY, DAILY, WEEKLY, MONTHLY. Specifies repeat period of the backupset.

Nested Schema for Nested Schema for scheduling

Read-Only:

  • backup_sets (Block Set) A list of schedules with backup sets that compose the whole scheme. (see below for nested schema)

  • enabled (Boolean) Enables or disables scheduling. Default true.

  • max_parallel_backups (Number) Maximum number of backup processes allowed to run in parallel. 0 for unlimited. Default 0.

  • random_max_delay (String) Configuration of the random delay between the execution of parallel tasks. See interval_type for available values. Default 30m.

  • scheme (String) Scheme of the backups. Available values are: ALWAYS_INCREMENTAL, ALWAYS_FULL, WEEKLY_FULL_DAILY_INCREMENTAL, WEEKLY_INCREMENTAL. Default ALWAYS_INCREMENTAL.

  • weekly_backup_day (String) A day of week to start weekly backups. See day_type for available values. Default MONDAY.

Nested Schema for Nested Schema for scheduling.backup_sets

Read-Only:

  • execute_by_interval (Number) Perform backup by interval, since last backup of the host. Maximum value is: 9999 days. See interval_type for available values. Exactly on of options should be set: execute_by_interval or execute_by_time.

  • execute_by_time (Block Set) Perform backup periodically at specific time. Exactly on of options should be set: execute_by_interval or execute_by_time. (see below for nested schema)

  • type (String) BackupSet type. See backup_set_type for available values. Default TYPE_AUTO.

Nested Schema for Nested Schema for scheduling.backup_sets.execute_by_time

Read-Only:

  • include_last_day_of_month (Boolean) If true, schedule will be applied on the last day of month. See day_type for available values. Default false.

  • monthdays (List of Number) List of days when schedule applies. Used in MONTHLY type.

  • months (List of Number) Set of values. Allowed values form 1 to 12.

  • repeat_at (List of String) List of time in format HH:MM (24-hours format), when the schedule applies.

  • repeat_every (String) Frequency of backup repetition. See interval_type for available values.

  • run_later (Boolean) If true and if the machine is off, launch missed tasks on boot up. Default false.

  • type (String) Type of the scheduling. Available values are: HOURLY, DAILY, WEEKLY, MONTHLY.

  • weekdays (List of String) List of weekdays when the backup will be applied. Used in WEEKLY type.

Nested Schema for Nested Schema for vm_snapshot_reattempts

Read-Only:

  • enabled (Boolean) Enable flag. Default true.

  • interval (String) Retry interval. See interval_type for available values. Default: 5m.

  • max_attempts (Number) Maximum number of attempts before throwing an error. Default 5.

Was the article helpful?

Previous
client_config
Next
backup_policy
© 2025 Direct Cursus Technology L.L.C.