MCP Tools Reference: backupdr.googleapis.com

Tool: ListBackupPlans

Lists all BackupPlans in a specified location. BackupPlans define the schedule and retention policies for backups. Use this to discover existing plans.

The following sample demonstrate how to use curl to invoke the ListBackupPlans MCP tool.

Curl Request
                  
curl --location 'https://backupdr.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "ListBackupPlans",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

Input Schema

The request message for getting a list BackupPlan.

ListBackupPlansRequest

JSON representation
{
  "parent": string,
  "pageSize": integer,
  "pageToken": string,
  "filter": string,
  "orderBy": string
}
Fields
parent

string

Required. The project and location for which to retrieve BackupPlans information. Format: projects/{project}/locations/{location}. In Google Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve backup plans for all locations, use "-" for the {location} value.

pageSize

integer

Optional. The maximum number of BackupPlans to return in a single response. If not specified, a default value will be chosen by the service. Note that the response may include a partial list and a caller should only rely on the response's next_page_token to determine if there are more instances left to be queried.

pageToken

string

Optional. The value of next_page_token received from a previous ListBackupPlans call. Provide this to retrieve the subsequent page in a multi-page list of results. When paginating, all other parameters provided to ListBackupPlans must match the call that provided the page token.

filter

string

Optional. Field match expression used to filter the results.

orderBy

string

Optional. Field by which to sort the results.

Output Schema

The response message for getting a list of BackupPlan.

ListBackupPlansResponse

JSON representation
{
  "backupPlans": [
    {
      object (BackupPlan)
    }
  ],
  "nextPageToken": string,
  "unreachable": [
    string
  ]
}
Fields
backupPlans[]

object (BackupPlan)

The list of BackupPlans in the project for the specified location.

If the {location} value in the request is "-", the response contains a list of resources from all locations. In case any location is unreachable, the response will only return backup plans in reachable locations and the 'unreachable' field will be populated with a list of unreachable locations. BackupPlan

nextPageToken

string

A token which may be sent as page_token in a subsequent ListBackupPlans call to retrieve the next page of results. If this field is omitted or empty, then there are no more results to return.

unreachable[]

string

Locations that could not be reached.

BackupPlan

JSON representation
{
  "name": string,
  "description": string,
  "labels": {
    string: string,
    ...
  },
  "createTime": string,
  "updateTime": string,
  "backupRules": [
    {
      object (BackupRule)
    }
  ],
  "maxCustomOnDemandRetentionDays": integer,
  "state": enum (State),
  "resourceType": string,
  "etag": string,
  "backupVault": string,
  "backupVaultServiceAccount": string,
  "logRetentionDays": string,
  "supportedResourceTypes": [
    string
  ],
  "revisionId": string,
  "revisionName": string,

  // Union field resource_properties can be only one of the following:
  "diskBackupPlanProperties": {
    object (DiskBackupPlanProperties)
  },
  "computeInstanceBackupPlanProperties": {
    object (ComputeInstanceBackupPlanProperties)
  }
  // End of list of possible types for union field resource_properties.
}
Fields
name

string

Output only. Identifier. The resource name of the BackupPlan.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

description

string

Optional. The description of the BackupPlan resource.

The description allows for additional details about BackupPlan and its use cases to be provided. An example description is the following: "This is a backup plan that performs a daily backup at 6pm and retains data for 3 months". The description must be at most 2048 characters.

labels

map (key: string, value: string)

Optional. This collection of key/value pairs allows for custom labels to be supplied by the user. Example, {"tag": "Weekly"}.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

createTime

string (Timestamp format)

Output only. When the BackupPlan was created.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. When the BackupPlan was last updated.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

backupRules[]

object (BackupRule)

Optional. The backup rules for this BackupPlan.

maxCustomOnDemandRetentionDays

integer

Optional. Optional field to configure the maximum number of days for which a backup can be retained. This field is only applicable for on-demand backups taken with custom retention value.

state

enum (State)

Output only. The State for the BackupPlan.

resourceType

string

Required. The resource type to which the BackupPlan will be applied. Examples include, "compute.googleapis.com/Instance", "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", "compute.googleapis.com/Disk".

etag

string

Optional. etag is returned from the service in the response. As a user of the service, you may provide an etag value in this field to prevent stale resources.

backupVault

string

Required. Resource name of backup vault which will be used as storage location for backups. Format: projects/{project}/locations/{location}/backupVaults/{backupvault}

backupVaultServiceAccount

string

Output only. The Google Cloud service account to be used by the BackupVault for taking backups. Specify the email address of the Backup Vault Service Account.

logRetentionDays

string (int64 format)

Optional. Applicable only for Cloud SQL resource_type.

Configures how long logs will be stored. It is defined in “days”. This value should be greater than or equal to minimum enforced log retention duration of the backup vault.

supportedResourceTypes[]

string

Output only. All resource types to which backupPlan can be applied.

revisionId

string

Output only. The user friendly revision ID of the BackupPlanRevision.

Example: v0, v1, v2, etc.

revisionName

string

Output only. The resource id of the BackupPlanRevision.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}

Union field resource_properties. Defines optional workload-specific properties for backups generated by this plan. resource_properties can be only one of the following:
diskBackupPlanProperties

object (DiskBackupPlanProperties)

Optional. Defines optional properties specific to backups of disk-based resources, such as Compute Engine Persistent Disks. This includes settings like whether to perform a guest flush.

computeInstanceBackupPlanProperties

object (ComputeInstanceBackupPlanProperties)

Optional. Defines optional properties specific to backups of compute instance-based resources, such as Compute Engine. This includes settings like whether to perform a guest flush.

LabelsEntry

JSON representation
{
  "key": string,
  "value": string
}
Fields
key

string

value

string

Timestamp

JSON representation
{
  "seconds": string,
  "nanos": integer
}
Fields
seconds

string (int64 format)

Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).

nanos

integer

Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive.

BackupRule

JSON representation
{
  "ruleId": string,
  "backupRetentionDays": integer,

  // Union field backup_schedule_oneof can be only one of the following:
  "standardSchedule": {
    object (StandardSchedule)
  }
  // End of list of possible types for union field backup_schedule_oneof.
}
Fields
ruleId

string

Required. Immutable. The unique id of this BackupRule. The rule_id is unique per BackupPlan.The rule_id must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /[a-z][a-z0-9-]{,62}/.

backupRetentionDays

integer

Required. Configures the duration for which backup data will be kept. It is defined in “days”. The value should be greater than or equal to minimum enforced retention of the backup vault.

Minimum value is 1 and maximum value is 36159 for custom retention on-demand backup. Minimum and maximum values are workload specific for all other rules. Note: Longer retention can lead to higher storage costs post introductory trial. We recommend starting with a short duration of 3 days or less.

Union field backup_schedule_oneof. The schedule that defines the automated backup workloads for this BackupRule. backup_schedule_oneof can be only one of the following:
standardSchedule

object (StandardSchedule)

Optional. Defines a schedule that runs within the confines of a defined window of time.

StandardSchedule

JSON representation
{
  "recurrenceType": enum (RecurrenceType),
  "hourlyFrequency": integer,
  "daysOfWeek": [
    enum (DayOfWeek)
  ],
  "daysOfMonth": [
    integer
  ],
  "weekDayOfMonth": {
    object (WeekDayOfMonth)
  },
  "months": [
    enum (Month)
  ],
  "backupWindow": {
    object (BackupWindow)
  },
  "timeZone": string
}
Fields
recurrenceType

enum (RecurrenceType)

Required. Specifies the RecurrenceType for the schedule.

hourlyFrequency

integer

Optional. Specifies frequency for hourly backups. A hourly frequency of 1 means jobs will run every 1 hour from start time till end time defined.

This is required for recurrence_type, HOURLY and is not applicable otherwise. A validation error will occur if a value is supplied and recurrence_type is not HOURLY.

The supported values for each resource type are as follows:

  • compute.googleapis.com/Instance: 1-23
  • compute.googleapis.com/Disk: 1-23
  • sqladmin.googleapis.com/Instance: 6-23
  • alloydb.googleapis.com/Cluster: 1-23
  • file.googleapis.com/Instance: 1-23

Refer to link https://cloud.google.com/backup-disaster-recovery/docs/concepts/cloud_best_practices for more details.

daysOfWeek[]

enum (DayOfWeek)

Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs will run.

This is required for recurrence_type, WEEKLY and is not applicable otherwise. A validation error will occur if a value is supplied and recurrence_type is not WEEKLY.

daysOfMonth[]

integer

Optional. Specifies days of months like 1, 5, or 14 on which jobs will run.

Values for days_of_month are only applicable for recurrence_type, MONTHLY and YEARLY. A validation error will occur if other values are supplied.

weekDayOfMonth

object (WeekDayOfMonth)

Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST MONDAY, on which jobs will run. This will be specified by two fields in WeekDayOfMonth, one for the day, e.g. MONDAY, and one for the week, e.g. LAST.

This field is only applicable for recurrence_type, MONTHLY and YEARLY. A validation error will occur if other values are supplied.

months[]

enum (Month)

Optional. Specifies the months of year, like FEBRUARY and/or MAY, on which jobs will run.

This field is only applicable when recurrence_type is YEARLY. A validation error will occur if other values are supplied.

backupWindow

object (BackupWindow)

Required. A BackupWindow defines the window of day during which backup jobs will run. Jobs are queued at the beginning of the window and will be marked as NOT_RUN if they do not start by the end of the window.

Note: running jobs will not be cancelled at the end of the window.

timeZone

string

Required. The time zone to be used when interpreting the schedule. The value of this field must be a time zone name from the IANA tz database. See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the list of valid timezone names. For example, Europe/Paris.

WeekDayOfMonth

JSON representation
{
  "weekOfMonth": enum (WeekOfMonth),
  "dayOfWeek": enum (DayOfWeek)
}
Fields
weekOfMonth

enum (WeekOfMonth)

Required. Specifies the week of the month.

dayOfWeek

enum (DayOfWeek)

Required. Specifies the day of the week.

BackupWindow

JSON representation
{
  "startHourOfDay": integer,
  "endHourOfDay": integer
}
Fields
startHourOfDay

integer

Required. The hour of day (0-23) when the window starts for example if value of start hour of day is 6 that mean backup window start at 6:00.

endHourOfDay

integer

Required. The hour of day (1-24) when the window end for example if value of end hour of day is 10 that mean backup window end time is 10:00.

End hour of day should be greater than start hour of day. 0 <= start_hour_of_day < end_hour_of_day <= 24

End hour of day is not include in backup window that mean if end_hour_of_day= 10 jobs should start before 10:00.

DiskBackupPlanProperties

JSON representation
{
  "guestFlush": boolean
}
Fields
guestFlush

boolean

Optional. Indicates whether to perform a guest flush operation before taking a disk backup. When set to false, the system will create crash-consistent backups. Default value is false.

ComputeInstanceBackupPlanProperties

JSON representation
{
  "guestFlush": boolean
}
Fields
guestFlush

boolean

Optional. Indicates whether to perform a guest flush operation before taking a compute backup. When set to false, the system will create crash-consistent backups. Default value is false.

RecurrenceType

RecurrenceTypes enumerates the applicable periodicity for the schedule.

Enums
RECURRENCE_TYPE_UNSPECIFIED recurrence type not set
HOURLY The BackupRule is to be applied hourly.
DAILY The BackupRule is to be applied daily.
WEEKLY The BackupRule is to be applied weekly.
MONTHLY The BackupRule is to be applied monthly.
YEARLY The BackupRule is to be applied yearly.

DayOfWeek

Represents a day of the week.

Enums
DAY_OF_WEEK_UNSPECIFIED The day of the week is unspecified.
MONDAY Monday
TUESDAY Tuesday
WEDNESDAY Wednesday
THURSDAY Thursday
FRIDAY Friday
SATURDAY Saturday
SUNDAY Sunday

WeekOfMonth

WeekOfMonth enumerates possible weeks in the month, e.g. the first, third, or last week of the month.

Enums
WEEK_OF_MONTH_UNSPECIFIED The zero value. Do not use.
FIRST The first week of the month.
SECOND The second week of the month.
THIRD The third week of the month.
FOURTH The fourth week of the month.
LAST The last week of the month.

Month

Represents a month in the Gregorian calendar.

Enums
MONTH_UNSPECIFIED The unspecified month.
JANUARY The month of January.
FEBRUARY The month of February.
MARCH The month of March.
APRIL The month of April.
MAY The month of May.
JUNE The month of June.
JULY The month of July.
AUGUST The month of August.
SEPTEMBER The month of September.
OCTOBER The month of October.
NOVEMBER The month of November.
DECEMBER The month of December.

State

State enumerates the possible states for a BackupPlan.

Enums
STATE_UNSPECIFIED State not set.
CREATING The resource is being created.
ACTIVE The resource has been created and is fully usable.
DELETING The resource is being deleted.
INACTIVE The resource has been created but is not usable.
UPDATING The resource is being updated.

Tool Annotations

Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌