

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Neptune クラスターの復元
<a name="restoring-nep"></a>

## AWS Backup コンソールを使用して Amazon Neptune 復旧ポイントを復元する
<a name="nep-restore-console"></a>

Amazon Neptune データベースを復元するには、複数の復元オプションを指定する必要があります。これらのオプションについては、[Neptune ユーザーガイド](https://docs.aws.amazon.com/neptune/latest/userguide/backup-restore-restore-snapshot.html)の「*DB クラスタースナップショットからの復元*」を参照してください。

**Neptune データベースを復元するには**

1. [https://console.aws.amazon.com/backup](https://console.aws.amazon.com/backup) で AWS Backup コンソールを開きます。

1. ナビゲーションペインで、[**Protected resources (保護されたリソース)**] を選択し、復元する Neptune リソース ID を選択します。

1. **[リソースの詳細]** ページには、選択したリソース ID の復旧ポイントのリストが表示されます。リソースを復元するには、[**バックアップ**] ペインで、リソースの復旧ポイント ID の横にあるラジオボタンをクリックします。ペインの右上隅にある **[復元]** を選択します。

1. [**インスタンスの仕様**] ペインで、デフォルトを受け入れるか、[**DB エンジン**] および [**バージョン**] を指定します。

1. **設定**ペインで、現在のリージョンで が所有するすべての DB クラスターインスタンス AWS アカウント に固有の名前を指定します。DB クラスター識別子は大文字と小文字の区別がありませんが、すべて小文字で保存されます (例: 「`mydbclusterinstance`」)。これは必須のフィールドです。

1. [**Database options (データベースオプション)**] ペインで、デフォルトを受け入れるか、[**Database port (データベースポート)**]、および [**DB cluster parameter group (DB クラスターパラメータグループ)**] 設定のオプションを指定します。

1. **[暗号化]** ペインで、デフォルトを使用するか、**[暗号化を有効にする]** または [**[暗号化を無効にする]** 設定のオプションを指定します。

1. **[ログエクスポート]** ペインで、Amazon CloudWatch Logs に発行するログタイプを選択します。**[IAM ロール]** は既に定義されています。

1. **[ロールを復元]** ペインで、この復元のために AWS Backup が引き受ける IAM ロールを選択します。

1. すべての設定を指定したら、**[バックアップを復元]** を選択します。

   **[復元ジョブ]** ペインが表示されます。ページ上部のメッセージには、復元ジョブに関する情報が表示されます。

1. 復元が完了したら、復元した Neptune クラスターを Amazon RDS インスタンスにアタッチします。

## AWS Backup API、CLI、または SDK を使用して Neptune リカバリポイントを復元する
<a name="nep-restore-cli"></a>

まず、クラスターを復元します。`[StartRestoreJob](https://docs.aws.amazon.com/aws-backup/latest/devguide/API_StartRestoreJob.html)` を使用します。Amazon DocumentDB 復元中に、以下のメタデータを指定できます。

```
availabilityZones
backtrackWindow
copyTagsToSnapshot // Boolean 
databaseName // string 
dbClusterIdentifier // string 
dbClusterParameterGroupName // string 
dbSubnetGroupName // string 
enableCloudwatchLogsExports // string 
enableIAMDatabaseAuthentication // Boolean 
engine // string 
engineMode // string 
engineVersion // string 
kmsKeyId // string 
port // integer 
optionGroupName // string 
scalingConfiguration
vpcSecurityGroupIds // string
```

次に、`create-db-instance` を使用して、復元した Neptune クラスターを Amazon RDS インスタンスにアタッチします。
+ Linux、macOS、Unix の場合:

  ```
  aws neptune create-db-instance --db-instance-identifier sample-instance \ 
                    --db-instance-class db.r5.large --engine neptune --engine-version 1.0.5.0 --db-cluster-identifier sample-cluster --region us-east-1
  ```
+ Windows の場合:

  ```
  aws neptune create-db-instance --db-instance-identifier sample-instance ^
                    --db-instance-class db.r5.large --engine neptune --engine-version 1.0.5.0 --db-cluster-identifier sample-cluster --region us-east-1
  ```

詳細については、「Neptune 管理 API リファレンス」の「[https://docs.aws.amazon.com/neptune/latest/userguide/api-snapshots.html#RestoreDBClusterFromSnapshot](https://docs.aws.amazon.com/neptune/latest/userguide/api-snapshots.html#RestoreDBClusterFromSnapshot)」と「Neptune CLI ガイド」の「[https://awscli.amazonaws.com/v2/documentation/api/latest/reference/neptune/restore-db-cluster-from-snapshot.html](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/neptune/restore-db-cluster-from-snapshot.html)」を参照してください。****