PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, October 25, 2022

[FIXED] how to rename index while getting a snapshot usuing rename pattern?

 October 25, 2022     elasticsearch, regex     No comments   

Issue

i want to get a snapshot from repository, but instead log-events-2022.01.01 - events-2022.01.01. Can it possible replace 'log-' ?

POST _snapshot/snapshots/1/_restore
{
  "indices": "log-events-2022.01.01",
  "rename_pattern": "(.+)",
  "rename_replacement": "events_$1"

}

Solution

Tldr;

Update the regex, to mach the part you want to keep.

Solution

POST _snapshot/snapshots/1/_restore
{
  "indices": "log-events-2022.01.01",
  "rename_pattern": "log-(.+)",
  "rename_replacement": "$1"

}


Answered By - Paulo
Answer Checked By - Timothy Miller (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing