Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 如何使用cassandra snapshotter进行数据备份?_Amazon Web Services_Amazon S3_Cassandra - Fatal编程技术网

Amazon web services 如何使用cassandra snapshotter进行数据备份?

Amazon web services 如何使用cassandra snapshotter进行数据备份?,amazon-web-services,amazon-s3,cassandra,Amazon Web Services,Amazon S3,Cassandra,我必须将我的cassandra节点的数据备份上传到AmazonAWSS3。当我执行以下命令时 cassandra-snapshotter --aws-access-key-id=**** --aws-secret-access-key=**** --s3-bucket-name=inblox-exp-buck --s3-bucket-region=ap-southeast-2 --s3-base-path=test1 backup --hosts=52.64.45.152,52.64.28.14

我必须将我的cassandra节点的数据备份上传到AmazonAWSS3。当我执行以下命令时

cassandra-snapshotter --aws-access-key-id=**** --aws-secret-access-key=**** --s3-bucket-name=inblox-exp-buck --s3-bucket-region=ap-southeast-2 --s3-base-path=test1 backup --hosts=52.64.45.152,52.64.28.145 --user=ubuntu
我得到以下错误

[52.64.45.152] Executing task 'node_start_backup'
[52.64.28.145] Executing task 'node_start_backup'

Fatal error: Needed to prompt for a connection or sudo password (host: 52.64.28.145), but input would be ambiguous in parallel mode

Aborting.
Needed to prompt for a connection or sudo password (host: 52.64.28.145), but input would be ambiguous in parallel mode

Fatal error: Needed to prompt for a connection or sudo password (host: 52.64.45.152), but input would be ambiguous in parallel mode

Aborting.
Needed to prompt for a connection or sudo password (host: 52.64.45.152), but input would be ambiguous in parallel mode

Fatal error: One or more hosts failed while executing task 'node_start_backup'

Aborting.
[52.64.45.152] Executing task 'clear_node_snapshot'
[52.64.28.145] Executing task 'clear_node_snapshot'
[52.64.28.145] sudo: /usr/bin/nodetool clearsnapshot -t "20150416144918"
[52.64.45.152] sudo: /usr/bin/nodetool clearsnapshot -t "20150416144918"

Fatal error: Needed to prompt for a connection or sudo password (host: 52.64.28.145), but input would be ambiguous in parallel mode

Aborting.
Needed to prompt for a connection or sudo password (host: 52.64.28.145), but input would be ambiguous in parallel mode

Fatal error: Needed to prompt for a connection or sudo password (host: 52.64.45.152), but input would be ambiguous in parallel mode

Aborting.
Needed to prompt for a connection or sudo password (host: 52.64.45.152), but input would be ambiguous in parallel mode

Fatal error: One or more hosts failed while executing task 'clear_node_snapshot'

Aborting.
One or more hosts failed while executing task 'clear_node_snapshot'

这里发生了什么?如何解决此问题?

Cassandra snapshotter对主机执行ssh,因此请确保在.ssh/authorized keys文件中列出了“ubuntu”用户的rsa pub密钥。或者,您可以在代码中关闭ssh选项。

仅当访问主机需要密码时, 我发现了同样的问题,并通过传递密码解决了它

如需帮助:

$cassandra-snapshotter backup -h
在你的命令中应该是这样的

 cassandra-snapshotter --aws-access-key-id=**** --aws-secret-access-key=**** --s3-bucket-name=inblox-exp-buck --s3-bucket-region=ap-southeast-2 --s3-base-path=test1 backup --hosts=xx.xx.xx.xx,xx.xx.xx.xx --user=ubuntu --password=*****

我可以接受支援

设置

  • 3节点集群
  • 运行备份命令的独立计算机
  • 所有都是aws ec2机器
我使用了下面的命令

cassandra-snapshotter --s3-bucket-name=BUCKET_NAME \
--s3-bucket-region=us-east-1 \
--s3-base-path=CLUSTER_BACKUP \
--aws-access-key-id=KEY \
--aws-secret-access-key=SECRET \
 backup \
--hosts=PUBLIC_IP_1,PUBLIC_IP_2,PUBLIC_IP_3 \
--sshkey=YOUR_PEM_FILE.pem