我们有一个运行的 elasticsearch 6.6 实例,它有多个索引,所以我拍了一张我感兴趣的两个索引的快照。我设置了一个新的 dockerized 单节点 elasticsearch 6.6 实例,我试图在其中恢复使用 curl 进行快照。索引恢复了,但是10个分片都是红色的。因此,我删除了两个恢复的索引,并再次运行该操作,但这次是在 Kibana 中。在此恢复操作后,从 SAME 快照恢复后,分片现在全是绿色的,我的查询 elasticsearch 的应用程序正在运行!
我很抱歉没有输出,但我已经离开了一周的工作,所以我还不能发布我的快照和恢复的细节。你们中的任何人是否对可能导致通过 curl 进行的恢复似乎有效,但碎片都是红色的有什么建议?为什么通过kibana删除和重新恢复效果更好?拍摄快照时,我肯定将 include_global_state 设置为 false。而且,在星期一,如果不清楚为什么会发生这种情况,那么我会发布更多细节。提前致谢!
答案 0 :(得分:0)
这似乎只是一个权限问题!我使用 docker-compose 启动了容器,然后调用了 import React,{useEffect, useState} from 'react';
import MaterialTable from 'material-table';
import 'bootstrap/dist/css/bootstrap.min.css';
import axios from 'axios';
function Paginacion() {
const [data, setData]=useState([]);
//la ruta http funciona sin problemas por que no lleva parametros
/*
const peticionGet =async() =>{
await axios.get('https://www.creditos.hoztcreative.com/apiCreditos/paginacion/')
.then(response=>{
setData(response.data);
console.log(response.data);
}).catch(error=>{
console.log(error);
})
}*/
// la ruta http no funciona con parametros
const peticionGet =async() =>{
await axios.get('https://www.creditos.hoztcreative.com/apiCreditos/paginacion/index.php?documento=1110498191')
.then(response=>{
setData(response.data);
console.log(response.data);
}).catch(error=>{
console.log(error);
})
}
useEffect(()=>{
peticionGet();
},[])
const columnas =[
{
title:"RUTA",
field: "id_ubicacion"
},
{
title:'NOMBRE',
field:'pais'
},
{
title:"APELLIDO",
field: "departamento"
},
];
return (
<div className="content-wrapper">
<MaterialTable
columns={columnas}
data={data}
pagination
fixedHeader
options={{
actionsColumnIndex: -1
}}
options={{
actionsCellStyle: {
},
}}
localization={{
header:{
actions: 'ACCIONES'
},
}}
/>
</div>
);
}
export default Paginacion
。该脚本从另一个集群中提取了包含 elasticsearch 快照的 gzip tar 文件。那么,做 docker-compose exec my_elastic_container /bin/bash /scripts/import-data.sh
意味着该操作是由容器的 root 用户完成的,但是快照恢复操作是由由 elasticsearch 用户启动的 elasticsearch 完成的。如果我在提取存档后执行 docker-compose exec
,然后调用以恢复快照,则一切正常。明天我会做更彻底的测试,如果我错过了什么,请编辑这个答案。