Skip to content

Commit

Permalink
Close indices before restoring
Browse files Browse the repository at this point in the history
  • Loading branch information
rolljee committed Jan 24, 2024
1 parent f9f4eaf commit 399f679
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/commands/es/snapshot/restore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export default class EsSnapshotsRestore extends Kommand {
async runSafe() {
const esClient = new Client({ node: this.flags.node });

await esClient.indices.close({
index: "*",
});

const esRequest = {
repository: this.args.repository,
snapshot: this.args.name,
Expand Down

0 comments on commit 399f679

Please sign in to comment.