HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/396/lib/surface/metastore/services/restore.yaml
- release_tracks: [ALPHA, BETA, GA]
  help_text:
    brief: |
      Restore a Dataproc Metastore service.
    description: |
      Restore a Dataproc Metastore service from the given backup or backup-location

      If run asynchronously with `--async`, exits after printing
      an operation name that can be used to poll the status of the
      creation via:

        {top_command} metastore operations describe
    examples: |
      To restore a Dataproc Metastore service with the name `my-service` from the backup
      `my-backup` with a `FULL` restore type, run:

          $ {command} my-service --backup=my-backup --restore-type=full

      To restore a Dataproc Metastore service with the name `my-service` from the backup-location
      `gs://gcs_bucket` with a `FULL` restore type, run:

          $ {command} my-service --backup-location=gs://gcs_bucket --restore-type=full

  request:
    ALPHA:
      api_version: v1alpha
      modify_request_hooks:
      - googlecloudsdk.command_lib.metastore.services.backups.util:UpdateBackupV1Alpha
    BETA:
      api_version: v1beta
      modify_request_hooks:
      - googlecloudsdk.command_lib.metastore.services.backups.util:UpdateBackupV1Beta
    GA:
      api_version: v1
      modify_request_hooks:
      - googlecloudsdk.command_lib.metastore.services.backups.util:UpdateBackupV1
    collection: metastore.projects.locations.services
    method: restore

  arguments:
    resource:
      help_text: |
        Arguments and flags that specify the Dataproc Metastore service
        you want to restore.
      spec: !REF googlecloudsdk.command_lib.metastore.resources:service
    params:
    - group:
        help_text: |
          The backup resource or the location of the backup artifacts to store from.
        required: true
        mutex: true
        params:
        - arg_name: backup
          api_field: restoreServiceRequest.backup
          help_text:  |
            The backup resource to restore from.
            This can be the backup's ID, fully-qualified URL, or relative name in the form
            `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
        - arg_name: backup-location
          api_field: restoreServiceRequest.backupLocation
          help_text:  |
            The location of the backup artifacts to restore from.
            This should be a Cloud Storage URI, contains backup avro files under "avro/",
            backup_metastore.json and service.json, in the form `gs://<path_to_backup>`.
    - arg_name: restore-type
      api_field: restoreServiceRequest.restoreType
      help_text:  |
        The type of restore to perform.
      default: metadata-only
      choices:
      - arg_value: full
        enum_value: FULL
        help_text:  |
          The service's metadata and configuration are restored.
      - arg_value: metadata-only
        enum_value: METADATA_ONLY
        help_text:  |
          Only the service's metadata is restored.

  async:
    collection: metastore.projects.locations.operations