0
我需要从elasticsearch备份我的索引,然后恢复它。我找不到一个例子。我试着写是这样的:如何在Nest中创建快照?
public virtual ISnapshotResponse BackUp()
{
return _client.Snapshot("D:\\snapshots", "1", descriptor => descriptor
.Indices(_indexString)
.IncludeGlobalState(false));
}
但它也有因为repository
参数无效响应。
请帮我创建一个快照,然后恢复我的索引。
您需要先注册Elasticsearch的快照库,然后才能拍摄快照。请参阅https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html。 –