Amazon DocumentDB
Developer Guide

Creating a Manual Cluster Snapshot

The amount of time it takes to create a snapshot varies with the size your databases. When you create a snapshot, you must do the following:

  1. Identify which cluster to back up.

  2. Give your snapshot a name. This allows you to restore from it later.

You can create a manual snapshot using either the AWS Management Console or AWS CLI.

Using the AWS Management Console

There are two different ways to create a manual snapshot using the console.

To manually create a snapshot (method 1)

  1. Sign in to the AWS Management Console, and open the Amazon DocumentDB console at https://console.aws.amazon.com/docdb.

  2. In the navigation pane, choose Snapshots.

    Tip

    If you do not see the navigation pane on the left side of your screen, choose the menu icon () in the upper-left corner of the page.

  3. On the Snapshots page, choose Create.

  4. On the Create cluster snapshot page:

    1. In the list of clusters, choose the cluster that you want to create a snapshot of.

    2. In the Snapshot name box, enter a name for your snapshot.

    3. Choose Create.

To manually create a snapshot (method 2)

  1. Sign in to the AWS Management Console, and open the Amazon DocumentDB console at https://console.aws.amazon.com/docdb.

  2. In the navigation pane, choose clusters.

    Tip

    If you do not see the navigation pane on the left side of your screen, choose the menu icon () in the upper-left corner of the page.

  3. On the clusters page, choose the button to the left of the cluster that you want to snapshot.

  4. On the Actions menu, choose Take snapshot.

  5. On the Create cluster snapshot page:

    1. In the Snapshot name box, enter a name for your snapshot.

    2. Choose Create.

Using the AWS CLI

To create a cluster snapshot using the AWS CLI, use the create-db-cluster-snapshot operation with the following parameters.

Parameters

  • --db-cluster-identifier—Required. The name of the cluster that you are taking a snapshot of. This cluster must exist and be available.

  • --db-cluster-snapshot-identifier—Required. The name of the manual snapshot that you are creating.

In the following example, you create a snapshot named sample-cluster-snapshot for a cluster named sample-cluster.

For Linux, macOS, or Unix:

aws docdb create-db-cluster-snapshot \ --db-cluster-identifier sample-cluster \ --db-cluster-snapshot-identifier sample-cluster-snapshot

For Windows:

aws docdb create-db-cluster-snapshot ^ --db-cluster-identifier sample-cluster ^ --db-cluster-snapshot-identifier sample-cluster-snapshot

Output from this operation looks something like the following (JSON format).

{ "DBClusterSnapshot": { "VpcId": "vpc-91280df6", "Port": 0, "AvailabilityZones": [ "us-east-1a", "us-east-1b", "us-east-1c" ], "IAMDatabaseAuthenticationEnabled": false, "DBClusterSnapshotArn": "arn:aws:rds:us-east-1:012345678901:cluster-snapshot:sample-cluster-snapshot", "AllocatedStorage": 1, "PercentProgress": 0, "ClusterCreateTime": "2018-06-26T17:32:07.729Z", "StorageEncrypted": false, "Engine": "docdb", "SnapshotType": "manual", "Status": "creating", "MasterUsername": "<user-name>", "LicenseModel": "n/a", "SnapshotCreateTime": "2018-06-26T18:16:36.560Z", "DBClusterSnapshotIdentifier": "sample-cluster-snapshot", "DBClusterIdentifier": "sample-cluster", "EngineVersion": "3.6.0" } }