[root@risen-un01 bin]# ./elasticdump --input=http://192.168.5.249:9200/sentiment_latest --output=http://192.168.5.31:9200/ads_yq_sentiment_app --type=data
Wed, 04 Aug 2021 03:03:29 GMT | starting dump
Wed, 04 Aug 2021 03:03:30 GMT | Error Emitted => {"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}
Wed, 04 Aug 2021 03:03:30 GMT | Error Emitted => {"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}
Wed, 04 Aug 2021 03:03:30 GMT | Total Writes: 0
Wed, 04 Aug 2021 03:03:30 GMT | dump ended with error (get phase) => UNAUTHORIZED: {"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}
是因为ES有账号密码设置,在命令中加上账号密码即可
[root@risen-un01 bin]# ./elasticdump --input=http://elastic:fToC@192.168.5.249:9200/sentiment_latest --output=http://192.168.5.31:9200/ads_yq_sentiment_app --type=data
Wed, 04 Aug 2021 03:08:13 GMT | starting dump
Wed, 04 Aug 2021 03:08:14 GMT | got 100 objects from source elasticsearch (offset: 0)
Wed, 04 Aug 2021 03:08:26 GMT | sent 100 objects to destination elasticsearch, wrote 100
Wed, 04 Aug 2021 03:08:26 GMT | got 100 objects from source elasticsearch (offset: 100)
Wed, 04 Aug 2021 03:08:29 GMT | sent 100 objects to destination elasticsearch, wrote 100
Wed, 04 Aug 2021 03:08:29 GMT | got 100 objects from source elasticsearch (offset: 200)
Wed, 04 Aug 2021 03:08:31 GMT | sent 100 objects to destination elasticsearch, wrote 100
Wed, 04 Aug 2021 03:08:31 GMT | got 100 objects from source elasticsearch (offset: 300)
Wed, 04 Aug 2021 03:08:32 GMT | sent 100 objects to destination elasticsearch, wrote 100
Wed, 04 Aug 2021 03:08:32 GMT | got 100 objects from source elasticsearch (offset: 400)
Wed, 04 Aug 2021 03:08:33 GMT | sent 100 objects to destination elasticsearch, wrote 100
Wed, 04 Aug 2021 03:08:33 GMT | got 100 objects from source elasticsearch (offset: 500)
Wed, 04 Aug 2021 03:08:33 GMT | sent 100 objects to destination elasticsearch, wrote 100
Wed, 04 Aug 2021 03:08:33 GMT | got 100 objects from source elasticsearch (offset: 600)
Wed, 04 Aug 2021 03:08:33 GMT | sent 100 objects to destination elasticsearch, wrote 100
|