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。 –