翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
neptune-export コマンドラインツールを使用して Neptune からデータをエクスポートする
次の手順を使用して、neptune-export コマンドラインユーティリティを使用して Neptune DB クラスターから Amazon S3 にデータをエクスポートできます。
neptune-export コマンドラインユーティリティを使用するための前提条件
開始する前に
JDK のバージョン 8 がある — Java SE Development Kit (JDK)
バージョン 8 をインストールしておく必要があります。 neptune-export ユーティリティをダウンロードする — neptune-export.jar
ファイルをダウンロードしてインストールします。 -
neptune-exportが Neptune VPC にアクセスできることを確認してください — Neptune DB クラスターがある VPC にアクセスできる場所から neptune-export を実行します。たとえば、Neptune VPC 内の Amazon EC2 インスタンス、または Neptune VPC とピアリングされている別の VPC、または別の踏み台ホストで実行できます。
-
VPC セキュリティグループが
neptune-exportにアクセス権を付与していることを確認します — Neptune VPC にアタッチされた VPC セキュリティグループが、neptune-export環境に関連付けられている IP アドレスまたはセキュリティグループから DB クラスターへのアクセスを許可していることを確認します。 -
必要な IAM アクセス許可を設定する – データベースで AWS Identity and Access Management (IAM) データベース認証が有効になっている場合は、
neptune-exportを実行するロールが Neptune への接続を許可する IAM ポリシーに関連付けられていることを確認してください。Neptune ポリシーの詳細については、IAM ポリシーの使用 を参照してください。クエリリクエストの
clusterIdエクスポートパラメータを使用したい場合、neptune-exportを実行中のロールには、次の IAM アクセス権限が必要です。rds:DescribeDBClustersrds:DescribeDBInstancesrds:ListTagsForResource
クローンされたクラスターからエクスポートする場合は、
neptune-exportを実行中のロールには、次の IAM アクセス権限が必要です。rds:AddTagsToResourcerds:DescribeDBClustersrds:DescribeDBInstancesrds:ListTagsForResourcerds:DescribeDBClusterParametersrds:DescribeDBParametersrds:ModifyDBParameterGrouprds:ModifyDBClusterParameterGrouprds:RestoreDBClusterToPointInTimerds:DeleteDBInstancerds:DeleteDBClusterParameterGrouprds:DeleteDBParameterGrouprds:DeleteDBClusterrds:CreateDBInstancerds:CreateDBClusterParameterGrouprds:CreateDBParameterGroup
エクスポートされたデータを Amazon S3 に発行するには、
neptune-exportを実行中のロールには、Amazon S3 ロケーションに対して次の IAM アクセス権限が必要です。s3:PutObjects3:PutObjectTaggings3:GetObject
-
SERVICE_REGION環境変数を設定する —SERVICE_REGION環境変数を設定して DB クラスターが配置されているリージョンを識別します (リージョン識別子のリストについてはNeptune に接続するを参照)。
neptune-export ユーティリティを実行しエクスポート操作を開始する
次のコマンドを使用して、コマンドラインから neptune-export を実行し、エクスポート操作を開始します。
java -jar neptune-export.jar nesvc \ --root-path(path to a local directory)\ --json(the JSON file that defines the export)
コマンドには、2 つのパラメータがあります。
エクスポート開始時の neptune-Export のパラメータ
--root-path— エクスポートファイルが Amazon S3 に発行される前に書き込まれるローカルディレクトリへのパス。--json— エクスポートを定義する JSON オブジェクト。
neptune-export コマンドラインユーティリティを使用したコマンド例
ソース DB クラスターから直接プロパティグラフデータをエクスポートするには、次の手順を実行します。
java -jar neptune-export.jar nesvc \ --root-path /home/ec2-user/neptune-export \ --json '{ "command": "export-pg", "outputS3Path" : "s3://(your Amazon S3 bucket)/neptune-export", "params": { "endpoint" : "(your neptune DB cluster endpoint)" } }'
ソース DB クラスターから直接 RDF データをエクスポートするには、次の手順を実行します。
java -jar neptune-export.jar nesvc \ --root-path /home/ec2-user/neptune-export \ --json '{ "command": "export-rdf", "outputS3Path" : "s3://(your Amazon S3 bucket)/neptune-export", "params": { "endpoint" : "(your neptune DB cluster endpoint)" } }'
command リクエストパラメーターを省略した場合、デフォルトでは、neptune-export ユーティリティは Neptune からプロパティグラフデータをエクスポートします。
DB クラスターのクローンからエクスポートするには、次の手順を実行します。
java -jar neptune-export.jar nesvc \ --root-path /home/ec2-user/neptune-export \ --json '{ "command": "export-pg", "outputS3Path" : "s3://(your Amazon S3 bucket)/neptune-export", "params": { "endpoint" : "(your neptune DB cluster endpoint)", "cloneCluster" : true } }'
IAM 認証を使用して DB クラスターからエクスポートするには、次の手順を実行します。
java -jar neptune-export.jar nesvc \ --root-path /home/ec2-user/neptune-export \ --json '{ "command": "export-pg", "outputS3Path" : "s3://(your Amazon S3 bucket)/neptune-export", "params": { "endpoint" : "(your neptune DB cluster endpoint)" "useIamAuth" : true } }'