---
title: "POST /v1/projects/{project}/instances/{instance}/clone"
method: POST
path: "/v1/projects/{project}/instances/{instance}/clone"
tags: ["instances"]
---

# POST /v1/projects/{project}/instances/{instance}/clone

`POST /v1/projects/{project}/instances/{instance}/clone`

Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.

## Path parameters

- `project` string, required
- `instance` string, required

## Request body

- InstancesCloneRequest — Database instance clone request.
  - `cloneContext` CloneContext — Database instance clone context.
    - `sourceInstanceDeletionTime` string, google-datetime — The timestamp used to identify the time when the source instance is deleted. If this instance is deleted, then you must set the timestamp.
    - `pointInTime` string, google-datetime — Timestamp, if specified, identifies the time to which the source instance is cloned.
    - `destinationProject` string — Optional. The project ID of the destination project where the cloned instance will be created. To perform a cross-project clone, this field is required. If not specified, the clone is created in the same project as the source instance.
    - `destinationNetwork` string — Optional. The fully qualified URI of the VPC network to which the cloned instance will be connected via private services access for private IP. For example:`projects/my-network-project/global/networks/my-network`. This field is only required for cross-project cloning.
    - `databaseNames` string[] — (SQL Server only) Clone only the specified databases from the source instance. Clone all databases if empty.
    - `destinationInstanceName` string — Required. Name of the Cloud SQL instance to be created as a clone.
    - `binLogCoordinates` BinLogCoordinates — Binary log coordinates.
      - `binLogFileName` string — Name of the binary log file for a Cloud SQL instance.
      - `binLogPosition` string, int64 — Position (offset) within the binary log file.
      - `kind` string — This is always `sql#binLogCoordinates`.
    - `allocatedIpRange` string — The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. Reserved for future use.
    - `preferredZone` string — Optional. Copy clone and point-in-time recovery clone of an instance to the specified zone. If no zone is specified, clone to the same primary zone as the source instance. This field applies to all DB types.
    - `preferredSecondaryZone` string — Optional. Copy clone and point-in-time recovery clone of a regional instance in the specified zones. If not specified, clone to the same secondary zone as the source instance. This value cannot be the same as the preferred_zone field. This field applies to all DB types.
    - `kind` string — This is always `sql#cloneContext`.
    - `pitrTimestampMs` string, int64 — Reserved for future use.

## Response `200`

Successful response

---

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