Skip to content

Commit

Permalink
esArchiver delete migrations v2 indices
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolf committed Jan 21, 2021
1 parent c91b296 commit c82a595
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/kbn-es-archiver/src/lib/indices/kibana_index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ export async function migrateKibanaIndex({
*/
async function fetchKibanaIndices(client: Client) {
const kibanaIndices = await client.cat.indices({ index: '.kibana*', format: 'json' });
const isKibanaIndex = (index: string) => /^\.kibana(:?_\d*)?$/.test(index);
const isKibanaIndex = (index: string) =>
/^\.kibana(:?_\d*)?$/.test(index) || /^\.kibana_(pre)*\d+\.\d+\.\d+_\d\d\d$/.test(index);
return kibanaIndices.map((x: { index: string }) => x.index).filter(isKibanaIndex);
}

Expand Down

0 comments on commit c82a595

Please sign in to comment.