---
title: "POST /v1/{+parent}/backups"
method: POST
path: "/v1/{+parent}/backups"
tags: ["projects"]
---

# POST /v1/{+parent}/backups

`POST /v1/{+parent}/backups`

Creates a new backup in a given project and location.

## Path parameters

- `parent` string, required

## Query parameters

- `backupId` string
- `requestId` string

## Request body

- Backup — The details of a backup resource.
  - `serviceRevision` Service — A managed metastore service that serves metadata queries.
    - `encryptionConfig` EncryptionConfig — Encryption settings for the service.
      - `kmsKey` string — Optional. The fully qualified customer provided Cloud KMS key name to use for customer data encryption, in the following format:projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}.
    - `hiveMetastoreConfig` HiveMetastoreConfig — Specifies configuration information specific to running Hive metastore software as the metastore service.
      - `kerberosConfig` KerberosConfig — Configuration information for a Kerberos principal.
        - `krb5ConfigGcsUri` string — Optional. A Cloud Storage URI that specifies the path to a krb5.conf file. It is of the form gs://{bucket_name}/path/to/krb5.conf, although the file does not need to be named krb5.conf explicitly.
        - `keytab` Secret — A securely stored value.
          - `cloudSecret` string — Optional. The relative resource name of a Secret Manager secret version, in the following form:projects/{project_number}/secrets/{secret_id}/versions/{version_id}.
        - `principal` string — Optional. A Kerberos principal that exists in the both the keytab the KDC to authenticate as. A typical principal is of the form primary/instance@REALM, but there is no exact format.
      - `endpointProtocol` 'ENDPOINT_PROTOCOL_UNSPECIFIED' | 'THRIFT' | 'GRPC' — Optional. The protocol to use for the metastore service endpoint. If unspecified, defaults to THRIFT.
      - `auxiliaryVersions` object — Optional. A mapping of Hive metastore version to the auxiliary version configuration. When specified, a secondary Hive metastore service is created along with the primary service. All auxiliary versions must be less than the service's primary version. The key is the auxiliary service name and it must match the regular expression a-z?. This means that the first character must be a lowercase letter, and all the following characters must be hyphens, lowercase letters, or digits, except the last character, which cannot be a hyphen.
      - `version` string — Immutable. The Hive metastore schema version.
      - `configOverrides` object — Optional. A mapping of Hive metastore configuration key-value pairs to apply to the Hive metastore (configured in hive-site.xml). The mappings override system defaults (some keys cannot be overridden). These overrides are also applied to auxiliary versions and can be further customized in the auxiliary version's AuxiliaryVersionConfig.
    - `endpointUri` string — Output only. The URI of the endpoint used to access the metastore service.
    - `labels` object — User-defined labels for the metastore service.
    - `metadataManagementActivity` MetadataManagementActivity — The metadata management activities of the metastore service.
      - `metadataExports` MetadataExport[] — Output only. The latest metadata exports of the metastore service.
        - `startTime` string, google-datetime — Output only. The time when the export started.
        - `destinationGcsUri` string — Output only. A Cloud Storage URI of a folder that metadata are exported to, in the form of gs:////, where is automatically generated.
        - `endTime` string, google-datetime — Output only. The time when the export ended.
        - `databaseDumpType` 'TYPE_UNSPECIFIED' | 'MYSQL' | 'AVRO' — Output only. The type of the database dump.
        - `state` 'STATE_UNSPECIFIED' | 'RUNNING' | 'SUCCEEDED' | 'FAILED' | 'CANCELLED' — Output only. The current state of the export.
      - `restores` Restore[] — Output only. The latest restores of the metastore service.
        - `type` 'RESTORE_TYPE_UNSPECIFIED' | 'FULL' | 'METADATA_ONLY' — Output only. The type of restore.
        - `endTime` string, google-datetime — Output only. The time when the restore ended.
        - `details` string — Output only. The restore details containing the revision of the service to be restored to, in format of JSON.
        - `startTime` string, google-datetime — Output only. The time when the restore started.
        - `backupLocation` string — Optional. A Cloud Storage URI specifying where the backup artifacts are stored, in the format gs:///.
        - `state` 'STATE_UNSPECIFIED' | 'RUNNING' | 'SUCCEEDED' | 'FAILED' | 'CANCELLED' — Output only. The current state of the restore.
        - `backup` string — Output only. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}.
    - `artifactGcsUri` string — Output only. A Cloud Storage URI (starting with gs://) that specifies where artifacts related to the metastore service are stored.
    - `tier` 'TIER_UNSPECIFIED' | 'DEVELOPER' | 'ENTERPRISE' — Optional. The tier of the service.
    - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'ACTIVE' | 'SUSPENDING' | 'SUSPENDED' | 'UPDATING' | 'DELETING' | 'ERROR' | 'AUTOSCALING' | 'MIGRATING' — Output only. The current state of the metastore service.
    - `maintenanceWindow` MaintenanceWindow — Maintenance window. This specifies when Dataproc Metastore may perform system maintenance operation to the service.
      - `hourOfDay` integer — Optional. The hour of day (0-23) when the window starts.
      - `dayOfWeek` 'DAY_OF_WEEK_UNSPECIFIED' | 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY' — Optional. The day of week, when the window starts.
    - `telemetryConfig` TelemetryConfig — Telemetry Configuration for the Dataproc Metastore service.
      - `logFormat` 'LOG_FORMAT_UNSPECIFIED' | 'LEGACY' | 'JSON' — Optional. The output format of the Dataproc Metastore service's logs.
    - `uid` string — Output only. The globally unique resource identifier of the metastore service.
    - `updateTime` string, google-datetime — Output only. The time when the metastore service was last updated.
    - `stateMessage` string — Output only. Additional information about the current state of the metastore service, if available.
    - `createTime` string, google-datetime — Output only. The time when the metastore service was created.
    - `network` string — Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:projects/{project_number}/global/networks/{network_id}.
    - `tags` object — Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing"
    - `port` integer — Optional. The TCP port at which the metastore service is reached. Default: 9083.
    - `scheduledBackup` ScheduledBackup — This specifies the configuration of scheduled backup.
      - `enabled` boolean — Optional. Defines whether the scheduled backup is enabled. The default value is false.
      - `timeZone` string — Optional. Specifies the time zone to be used when interpreting cron_schedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is UTC.
      - `nextScheduledTime` string, google-datetime — Output only. The time when the next backups execution is scheduled to start.
      - `backupLocation` string — Optional. A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing backup files will be stored below it.
      - `cronSchedule` string — Optional. The scheduled interval in Cron format, see https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is not enabled. Must be specified to enable scheduled backups.
      - `latestBackup` LatestBackup — The details of the latest scheduled backup.
        - `backupId` string — Output only. The ID of an in-progress scheduled backup. Empty if no backup is in progress.
        - `startTime` string, google-datetime — Output only. The time when the backup was started.
        - `duration` string, google-duration — Output only. The duration of the backup completion.
        - `state` 'STATE_UNSPECIFIED' | 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED' — Output only. The current state of the backup.
    - `databaseType` 'DATABASE_TYPE_UNSPECIFIED' | 'MYSQL' | 'SPANNER' — Immutable. The database type that the Metastore service stores its data.
    - `networkConfig` NetworkConfig — Network configuration for the Dataproc Metastore service.
      - `consumers` Consumer[] — Immutable. The consumer-side network configuration for the Dataproc Metastore instance.
        - `endpointLocation` string — Output only. The location of the endpoint URI. Format: projects/{project}/locations/{location}.
        - `subnetwork` string — Immutable. The subnetwork of the customer project from which an IP address is reserved and used as the Dataproc Metastore service's endpoint. It is accessible to hosts in the subnet and to all hosts in a subnet in the same region and same network. There must be at least one IP address available in the subnet's primary range. The subnet is specified in the following form:projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}
        - `endpointUri` string — Output only. The URI of the endpoint used to access the metastore service.
    - `name` string — Immutable. Identifier. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.
    - `releaseChannel` 'RELEASE_CHANNEL_UNSPECIFIED' | 'CANARY' | 'STABLE' — Immutable. The release channel of the service. If unspecified, defaults to STABLE.
    - `metadataIntegration` MetadataIntegration — Specifies how metastore metadata should be integrated with external services.
      - `dataCatalogConfig` DataCatalogConfig — Specifies how metastore metadata should be integrated with the Data Catalog service.
        - `enabled` boolean — Optional. Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog.
    - `deletionProtection` boolean — Optional. Indicates if the dataproc metastore should be protected against accidental deletions.
    - `scalingConfig` ScalingConfig — Represents the scaling configuration of a metastore service.
      - `instanceSize` 'INSTANCE_SIZE_UNSPECIFIED' | 'EXTRA_SMALL' | 'SMALL' | 'MEDIUM' | 'LARGE' | 'EXTRA_LARGE' — An enum of readable instance sizes, with each instance size mapping to a float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
      - `autoscalingConfig` AutoscalingConfig — Represents the autoscaling configuration of a metastore service.
        - `autoscalingFactor` number, float — Output only. The scaling factor of a service with autoscaling enabled.
        - `autoscalingEnabled` boolean — Optional. Whether or not autoscaling is enabled for this service.
        - `limitConfig` LimitConfig — Represents the autoscaling limit configuration of a metastore service.
          - `maxScalingFactor` number, float — Optional. The highest scaling factor that the service should be autoscaled to.
          - `minScalingFactor` number, float — Optional. The lowest scaling factor that the service should be autoscaled to.
      - `scalingFactor` number, float — Scaling factor, increments of 0.1 for values less than 1.0, and increments of 1.0 for values greater than 1.0.
  - `name` string — Immutable. Identifier. The relative resource name of the backup, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}
  - `endTime` string, google-datetime — Output only. The time when the backup finished creating.
  - `createTime` string, google-datetime — Output only. The time when the backup was started.
  - `description` string — Optional. The description of the backup.
  - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'DELETING' | 'ACTIVE' | 'FAILED' | 'RESTORING' — Output only. The current state of the backup.
  - `restoringServices` string[] — Output only. Services that are restoring from the backup.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/metastore.md) · [All operations](https://skmtc.net/google/apis/metastore/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/metastore/versions/303a0939d73e/schema)
