Note: The following fields are mutually exclusive: backup_appliance_backup_properties, compute_instance_backup_properties, cloud_sql_instance_backup_properties, disk_backup_properties. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: cloud_sql_instance_backup_properties, compute_instance_backup_properties, backup_appliance_backup_properties, disk_backup_properties. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: compute_instance_backup_properties, cloud_sql_instance_backup_properties, backup_appliance_backup_properties, disk_backup_properties. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: disk_backup_properties, compute_instance_backup_properties, cloud_sql_instance_backup_properties, backup_appliance_backup_properties. If a field in that set is populated, all other fields in the set will automatically be cleared.
value (::Google::Protobuf::Map{::String => ::String}) — Optional. Resource labels to represent user provided metadata.
No labels currently defined.
Returns
(::Google::Protobuf::Map{::String => ::String}) — Optional. Resource labels to represent user provided metadata.
No labels currently defined.
#name
defname()->::String
Returns
(::String) — Output only. Identifier. Name of the backup to create. It must have the
format"projects/<project>/locations/<location>/backupVaults/<backupvault>/dataSources/{datasource}/backups/{backup}".
{backup} cannot be changed after creation. It must be between 3-63
characters long and must be unique within the datasource.
#resource_size_bytes
defresource_size_bytes()->::Integer
Returns
(::Integer) — Output only. source resource size in bytes at the time of the backup.
#satisfies_pzi
defsatisfies_pzi()->::Boolean
Returns
(::Boolean) — Optional. Output only. Reserved for future use.
#satisfies_pzs
defsatisfies_pzs()->::Boolean
Returns
(::Boolean) — Optional. Output only. Reserved for future use.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Backup and DR Service V1 API - Class Google::Cloud::BackupDR::V1::Backup (v1.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.0 (latest)](/ruby/docs/reference/google-cloud-backupdr-v1/latest/Google-Cloud-BackupDR-V1-Backup)\n- [1.1.0](/ruby/docs/reference/google-cloud-backupdr-v1/1.1.0/Google-Cloud-BackupDR-V1-Backup)\n- [1.0.1](/ruby/docs/reference/google-cloud-backupdr-v1/1.0.1/Google-Cloud-BackupDR-V1-Backup)\n- [0.5.0](/ruby/docs/reference/google-cloud-backupdr-v1/0.5.0/Google-Cloud-BackupDR-V1-Backup)\n- [0.4.0](/ruby/docs/reference/google-cloud-backupdr-v1/0.4.0/Google-Cloud-BackupDR-V1-Backup)\n- [0.3.0](/ruby/docs/reference/google-cloud-backupdr-v1/0.3.0/Google-Cloud-BackupDR-V1-Backup)\n- [0.2.1](/ruby/docs/reference/google-cloud-backupdr-v1/0.2.1/Google-Cloud-BackupDR-V1-Backup)\n- [0.1.0](/ruby/docs/reference/google-cloud-backupdr-v1/0.1.0/Google-Cloud-BackupDR-V1-Backup) \nReference documentation and code samples for the Backup and DR Service V1 API class Google::Cloud::BackupDR::V1::Backup.\n\nMessage describing a Backup object. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #backup_appliance_backup_properties\n\n def backup_appliance_backup_properties() -\u003e ::Google::Cloud::BackupDR::V1::BackupApplianceBackupProperties\n\n**Returns**\n\n- ([::Google::Cloud::BackupDR::V1::BackupApplianceBackupProperties](./Google-Cloud-BackupDR-V1-BackupApplianceBackupProperties)) --- Output only. Backup Appliance specific backup properties.\n\n\n Note: The following fields are mutually exclusive: `backup_appliance_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #backup_appliance_locks\n\n def backup_appliance_locks() -\u003e ::Array\u003c::Google::Cloud::BackupDR::V1::BackupLock\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::BackupDR::V1::BackupLock](./Google-Cloud-BackupDR-V1-BackupLock)\\\u003e) --- Optional. The list of BackupLocks taken by the accessor Backup Appliance.\n\n### #backup_appliance_locks=\n\n def backup_appliance_locks=(value) -\u003e ::Array\u003c::Google::Cloud::BackupDR::V1::BackupLock\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::BackupDR::V1::BackupLock](./Google-Cloud-BackupDR-V1-BackupLock)\\\u003e) --- Optional. The list of BackupLocks taken by the accessor Backup Appliance. \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::BackupDR::V1::BackupLock](./Google-Cloud-BackupDR-V1-BackupLock)\\\u003e) --- Optional. The list of BackupLocks taken by the accessor Backup Appliance.\n\n### #backup_type\n\n def backup_type() -\u003e ::Google::Cloud::BackupDR::V1::Backup::BackupType\n\n**Returns**\n\n- ([::Google::Cloud::BackupDR::V1::Backup::BackupType](./Google-Cloud-BackupDR-V1-Backup-BackupType)) --- Output only. Type of the backup, unspecified, scheduled or ondemand.\n\n### #cloud_sql_instance_backup_properties\n\n def cloud_sql_instance_backup_properties() -\u003e ::Google::Cloud::BackupDR::V1::CloudSqlInstanceBackupProperties\n\n**Returns**\n\n- ([::Google::Cloud::BackupDR::V1::CloudSqlInstanceBackupProperties](./Google-Cloud-BackupDR-V1-CloudSqlInstanceBackupProperties)) --- Output only. Cloud SQL specific backup properties.\n\n\n Note: The following fields are mutually exclusive: `cloud_sql_instance_backup_properties`, `compute_instance_backup_properties`, `backup_appliance_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #compute_instance_backup_properties\n\n def compute_instance_backup_properties() -\u003e ::Google::Cloud::BackupDR::V1::ComputeInstanceBackupProperties\n\n**Returns**\n\n- ([::Google::Cloud::BackupDR::V1::ComputeInstanceBackupProperties](./Google-Cloud-BackupDR-V1-ComputeInstanceBackupProperties)) --- Output only. Compute Engine specific backup properties.\n\n\n Note: The following fields are mutually exclusive: `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`, `disk_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #consistency_time\n\n def consistency_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. The point in time when this backup was captured from the source.\n\n### #create_time\n\n def create_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. The time when the instance was created.\n\n### #description\n\n def description() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. The description of the Backup instance (2048 characters or less).\n\n### #disk_backup_properties\n\n def disk_backup_properties() -\u003e ::Google::Cloud::BackupDR::V1::DiskBackupProperties\n\n**Returns**\n\n- ([::Google::Cloud::BackupDR::V1::DiskBackupProperties](./Google-Cloud-BackupDR-V1-DiskBackupProperties)) --- Output only. Disk specific backup properties.\n\n\n Note: The following fields are mutually exclusive: `disk_backup_properties`, `compute_instance_backup_properties`, `cloud_sql_instance_backup_properties`, `backup_appliance_backup_properties`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #enforced_retention_end_time\n\n def enforced_retention_end_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Optional. The backup can not be deleted before this time.\n\n### #enforced_retention_end_time=\n\n def enforced_retention_end_time=(value) -\u003e ::Google::Protobuf::Timestamp\n\n**Parameter**\n\n- **value** ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Optional. The backup can not be deleted before this time. \n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Optional. The backup can not be deleted before this time.\n\n### #etag\n\n def etag() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. Server specified ETag to prevent updates from overwriting each other.\n\n### #etag=\n\n def etag=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. Server specified ETag to prevent updates from overwriting each other. \n**Returns**\n\n- (::String) --- Optional. Server specified ETag to prevent updates from overwriting each other.\n\n### #expire_time\n\n def expire_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Optional. When this backup is automatically expired.\n\n### #expire_time=\n\n def expire_time=(value) -\u003e ::Google::Protobuf::Timestamp\n\n**Parameter**\n\n- **value** ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Optional. When this backup is automatically expired. \n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Optional. When this backup is automatically expired.\n\n### #gcp_backup_plan_info\n\n def gcp_backup_plan_info() -\u003e ::Google::Cloud::BackupDR::V1::Backup::GCPBackupPlanInfo\n\n**Returns**\n\n- ([::Google::Cloud::BackupDR::V1::Backup::GCPBackupPlanInfo](./Google-Cloud-BackupDR-V1-Backup-GCPBackupPlanInfo)) --- Output only. Configuration for a Google Cloud resource.\n\n### #labels\n\n def labels() -\u003e ::Google::Protobuf::Map{::String =\u003e ::String}\n\n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- Optional. Resource labels to represent user provided metadata. No labels currently defined.\n\n### #labels=\n\n def labels=(value) -\u003e ::Google::Protobuf::Map{::String =\u003e ::String}\n\n**Parameter**\n\n- **value** (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- Optional. Resource labels to represent user provided metadata. No labels currently defined. \n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- Optional. Resource labels to represent user provided metadata. No labels currently defined.\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. Identifier. Name of the backup to create. It must have the format`\"projects/\u003cproject\u003e/locations/\u003clocation\u003e/backupVaults/\u003cbackupvault\u003e/dataSources/{datasource}/backups/{backup}\"`. `{backup}` cannot be changed after creation. It must be between 3-63 characters long and must be unique within the datasource.\n\n### #resource_size_bytes\n\n def resource_size_bytes() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- Output only. source resource size in bytes at the time of the backup.\n\n### #satisfies_pzi\n\n def satisfies_pzi() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- Optional. Output only. Reserved for future use.\n\n### #satisfies_pzs\n\n def satisfies_pzs() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- Optional. Output only. Reserved for future use.\n\n### #service_locks\n\n def service_locks() -\u003e ::Array\u003c::Google::Cloud::BackupDR::V1::BackupLock\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::BackupDR::V1::BackupLock](./Google-Cloud-BackupDR-V1-BackupLock)\\\u003e) --- Output only. The list of BackupLocks taken by the service to prevent the deletion of the backup.\n\n### #state\n\n def state() -\u003e ::Google::Cloud::BackupDR::V1::Backup::State\n\n**Returns**\n\n- ([::Google::Cloud::BackupDR::V1::Backup::State](./Google-Cloud-BackupDR-V1-Backup-State)) --- Output only. The Backup resource instance state.\n\n### #update_time\n\n def update_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. The time when the instance was updated."]]