

# Copying a DB Cluster Snapshot
<a name="backup-restore-copy-snapshot"></a>

With Neptune, you can copy automated or manual DB cluster snapshots. After you copy a snapshot, the copy is a manual snapshot. 

You can copy a snapshot within the same Amazon region and across Amazon regions. Snapshots can be copied across regions and accounts in a single step. 

Copying an automated snapshot to another Amazon account is a two-step process: First, you create a manual snapshot from the automated snapshot, and then you copy the manual snapshot to the other account. 

 As an alternative to copying, you can also share manual snapshots with other Amazon accounts. For more information, see [Sharing a DB Cluster Snapshot](backup-restore-share-snapshot.md). 

**Topics**
+ [Limitations on Copying a Snapshot](#backup-restore-copy-snapshot-limitations)
+ [Retention of DB Cluster Snapshot Copies](#backup-restore-copy-snapshot-retention)
+ [Handling Encryption When Copying Snapshots](#backup-restore-copy-snapshot-encryption)
+ [Copying Snapshots Across Amazon Regions](#backup-restore-copy-snapshot-cross-region)
+ [Copying a DB Cluster Snapshot Using the Console](#backup-restore-copy-snapshot-console)
+ [Copying a DB Cluster Snapshot Using the Amazon CLI](#backup-restore-copy-snapshot-cli)

## Limitations on Copying a Snapshot
<a name="backup-restore-copy-snapshot-limitations"></a>

The following are some limitations when you copy snapshots: 
+ You can copy a snapshot between China (Beijing) and China (Ningxia), but you can't copy a snapshot between these China regions and other Amazon Regions.
+ You can copy a snapshot between Amazon GovCloud (US-East) and Amazon GovCloud (US-West), but you can't copy a snapshot between these Amazon GovCloud (US) regions and other Amazon Regions.
+ If you delete a source snapshot before the target snapshot becomes available, the snapshot copy might fail. Verify that the target snapshot has a status of `AVAILABLE` before you delete a source snapshot. 
+ You can have up to five snapshot copy requests in progress to a single Region per account.
+ Depending on the regions involved and the amount of data to be copied, a cross-region snapshot copy can take hours to complete.

  If there is a large number of cross-region snapshot copy requests from a given source Amazon Region, Neptune may put new cross-region copy requests from that source Amazon Region into a queue until some in-progress copies complete. No progress information is displayed about copy requests while they are in that queue. Progress information is displayed only after the copy starts.

## Retention of DB Cluster Snapshot Copies
<a name="backup-restore-copy-snapshot-retention"></a>

Neptune deletes automated snapshots as follows:
+ At the end of their retention period.
+ When you disable automated snapshots for a DB cluster.
+ When you delete a DB cluster.

If you want to keep an automated snapshot for a longer period, copy it to create a manual snapshot, which is then retained until you delete it. Neptune storage costs might apply to manual snapshots if they exceed your default storage space.

## Handling Encryption When Copying Snapshots
<a name="backup-restore-copy-snapshot-encryption"></a>

You can copy a snapshot that has been encrypted using an Amazon KMS encryption key. If you copy an encrypted snapshot, the copy of the snapshot must also be encrypted. You can encrypt the copy with the same Amazon KMS encryption key as the original snapshot, or you can specify a different Amazon KMS encryption key. 

You cannot encrypt an unencrypted DB cluster snapshot when you copy it.

For Amazon Neptune DB cluster snapshots, you can also leave the DB cluster snapshot unencrypted and instead specify a Amazon KMS encryption key when restoring. The restored DB cluster is encrypted using the specified key.

## Copying Snapshots Across Amazon Regions
<a name="backup-restore-copy-snapshot-cross-region"></a>

When you copy a snapshot to an Amazon Region that is different from the source snapshot's Amazon Region, the first copy is a full snapshot copy, even if you copy an incremental snapshot. A full snapshot copy contains all of the data and metadata required to restore the DB instance. After the first snapshot copy, you can copy incremental snapshots of the same DB instance to the same destination region within the same Amazon account.

An incremental snapshot contains only the data that has changed after the most recent snapshot of the same DB instance. Incremental snapshot copying is faster and results in lower storage costs than full snapshot copying. Incremental snapshot copying across Amazon Regions is supported for both unencrypted and encrypted snapshots.

**Important**  
For shared snapshots, copying incremental snapshots is not supported. For shared snapshots, all of the copies are full snapshots, even within the same region.

Depending on the Amazon Regions involved and the amount of data to be copied, a cross-region snapshot copy can take hours to complete.

## Copying a DB Cluster Snapshot Using the Console
<a name="backup-restore-copy-snapshot-console"></a>

If your source database engine is Neptune, then your snapshot is a DB cluster snapshot. For each Amazon account, you can copy up to five DB cluster snapshots at a time per Amazon Region. Copying both encrypted and unencrypted DB cluster snapshots is supported.

To cancel a copy operation after it is in progress, delete the target DB cluster snapshot while that DB cluster snapshot is in **copying** status.

The following procedure works for copying encrypted or unencrypted DB cluster snapshots:

**To copy a DB cluster snapshot**

1. Sign in to the Amazon Management Console, and open the Amazon Neptune console at [https://console.aws.amazon.com/neptune/home](https://console.aws.amazon.com/neptune/home).

1. In the navigation pane, choose **Snapshots**.

1. Select the check box for the DB cluster snapshot you want to copy.

1. Choose **Actions**, and then choose **Copy Snapshot**. The **Make Copy of DB Snapshot** page appears.

1. Enter the name of the DB cluster snapshot copy in **New DB Snapshot Identifier**. 

1. To copy tags and values from the snapshot to the copy of the snapshot, choose **Copy Tags**.

1. For **Enable Encryption**, choose one of the following options: 
   + Choose **Disable encryption** if the DB cluster snapshot isn't encrypted and you don't want to encrypt the copy. 
   + Choose **Enable encryption** if the DB cluster snapshot isn't encrypted but you want to encrypt the copy. In this case, for **Master Key**, specify the Amazon KMS key identifier to use to encrypt the DB cluster snapshot copy. 
   + Choose **Enable encryption** if the DB cluster snapshot is encrypted. In this case, you must encrypt the copy, so **Yes** is already selected. For **Master Key**, specify the Amazon KMS key identifier to use to encrypt the DB cluster snapshot copy. 

1. Choose **Copy Snapshot**. 

## Copying a DB Cluster Snapshot Using the Amazon CLI
<a name="backup-restore-copy-snapshot-cli"></a>

You can copy a DB snapshot using the [copy-db-cluster-snapshot](api-snapshots.md#CopyDBClusterSnapshot) Amazon CLI command.

If you are copying the snapshot to a new Amazon Region, run the command in the new Region.

Use the following parameter descriptions and examples to determine which parameters to use in copying a snapshot with the Amazon CLI.
+ `--source-db-cluster-snapshot-identifier`   –   The identifier for the source DB snapshot.
  + If the source snapshot is in the same Amazon Region as the copy, specify a valid DB snapshot identifier, like `neptune:instance1-snapshot-20130805`.
  + If the source snapshot is in a different Amazon Region than the copy, specify a valid DB snapshot ARN like `arn:aws:neptune:us-west-2:123456789012:snapshot:instance1-snapshot-20130805`.
  + If you are copying from a shared manual DB snapshot, this parameter must be the Amazon Resource Name (ARN) of the shared DB snapshot.
  + If you are copying an encrypted snapshot, this parameter must be in the ARN format for the source Amazon Region, and must match the `SourceDBSnapshotIdentifier` in the `PreSignedUrl` parameter.
+ `--target-db-cluster-snapshot-identifier` –   –   The identifier for the new copy of the encrypted DB snapshot.
+ `--kms-key-id` –   –   The Amazon KMS key ID for an encrypted DB snapshot. The Amazon KMS key ID is the Amazon Resource Name (ARN), Amazon KMS key identifier, or the Amazon KMS key alias for the Amazon KMS encryption key.
  + If you copy an encrypted DB snapshot from your Amazon account, you can specify a value for this parameter to encrypt the copy with a new Amazon KMS encryption key. If you don't specify a value for this parameter, then the copy of the DB snapshot is encrypted with the same Amazon KMS key as the source DB snapshot.
  + You cannot use this parameter to create an encrypted copy of an unencrypted snapshot. Trying to do so will generate an error.
  + If you copy an encrypted snapshot to a different Amazon Region, then you must specify a Amazon KMS key for the destination Amazon Region. Amazon KMS encryption keys are specific to the Amazon Region that they are created in, and you cannot use encryption keys from one Amazon Region in another Amazon Region.
+ `--source-region` –   –   The ID of the Amazon Region where the source DB snapshot is. If you copy an encrypted snapshot to a different Amazon Region, then you must specify this option.
+ `--region` –   –   The ID of the Amazon Region into which you are copying the snapshot. If you copy an encrypted snapshot to a different Amazon Region, then you must specify this option.

**Example From Unencrypted, To Same Region**  
The following code creates a copy of a snapshot, with the new name `mydbsnapshotcopy`, from the `us-east-1` Amazon region to the `us-west-2` region.  
For Linux, OS X, or Unix:  

```
aws neptune copy-db-cluster-snapshot \
  --source-db-cluster-snapshot-identifier instance1-snapshot-20130805 \
  --target-db-cluster-snapshot-identifier mydbsnapshotcopy
```
For Windows:  

```
aws neptune copy-db-cluster-snapshot ^
  --source-db-cluster-snapshot-identifier instance1-snapshot-20130805 ^
  --target-db-cluster-snapshot-identifier mydbsnapshotcopy
```

**Example From Unencrypted, Across Regions**  
The following code creates a copy of a snapshot, with the new name `mydbsnapshotcopy`, from the `us-east-1` Amazon region to the `us-west-2` region. Run the command in the `us-west-2` region.  
For Linux, OS X, or Unix:  

```
aws neptune copy-db-cluster-snapshot \
  --source-db-cluster-snapshot-identifier arn:aws-cn:neptune:us-east-1:123456789012:snapshot:instance1-snapshot-20130805 \
  --target-db-cluster-snapshot-identifier mydbsnapshotcopy \
  --source-region us-east-1 \
  --region us-west-2
```
For Windows:  

```
aws neptune copy-db-cluster-snapshot ^
  --source-db-cluster-snapshot-identifier arn:aws-cn:neptune:us-east-1:123456789012:snapshot:instance1-snapshot-20130805 ^
  --target-db-cluster-snapshot-identifier mydbsnapshotcopy ^
  --source-region us-east-1 ^
  --region us-west-2
```

**Example From Encrypted, Across Regions**  
The following code example copies an encrypted DB snapshot from the `us-east-1` Amazon region to the `us-west-2` region. Run the command in the `us-west-2` region.  
For Linux, OS X, or Unix:  

```
aws neptune copy-db-cluster-snapshot \
  --source-db-cluster-snapshot-identifier arn:aws-cn:neptune:us-west-2:123456789012:snapshot:instance1-snapshot-20161115 \
  --target-db-cluster-snapshot-identifier mydbsnapshotcopy \
  --source-region us-east-1 \
  --region us-west-2
  --kms-key-id my_us_west_2_key
```
For Windows:  

```
aws neptune copy-db-cluster-snapshot ^
  --source-db-cluster-snapshot-identifier arn:aws-cn:neptune:us-west-2:123456789012:snapshot:instance1-snapshot-20161115 ^
  --target-db-cluster-snapshot-identifier mydbsnapshotcopy ^
  --source-region us-east-1 ^
  --region us-west-2
  --kms-key-id my-us-west-2-key
```