Commit 0aabb619 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Implementa restaurado de índices con rename

parent fb1ce4b1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -5,7 +5,9 @@
In order to restore Elasticsearch indices, you must create a new pipeline to deploy 'curator-restore' service.
Define these environment variables to configure manual pipeline:

* **DD_SNAPSHOT_RESTORE_NAME**: Snapshot source name to restore indices. Leave it empty to use last snapshot.
* **DD_SNAPSHOT_RESTORE_INDICES**: Name/expression to filter indices to restore. Accepts wildcards.
* **DD_SNAPSHOT_RESTORE_NAME**: Snapshot source name to restore indices. Leave it empty to use last snapshot. Empty by default.
* **DD_SNAPSHOT_RESTORE_INDICES**: Name/expression to filter indices to restore. Accepts wildcards. Leave it empty to restore all indices. Empty by default.
* **DD_SNAPSHOT_RESTORE_RENAME_PATTERN**: Expression to match indices names and prepare text groups to replace, in order to rename restored indices. Leave it empty to keep original names. Empty by default.
* **DD_SNAPSHOT_RESTORE_RENAME_REPLACEMENT**: Replacement for matched indices names, in order to rename restored indices. Default: `restored_<capture-group-1>`.

Then, you can run deploy task manually.
+3 −1
Original line number Diff line number Diff line
@@ -9,7 +9,9 @@ DELETE_OLD_LOGS_MONTHS_COUNT=2
SNAPSHOT_REPOSITORY=s3-backup
DELETE_OLD_SNAPSHOTS_DAYS_COUNT=90
SNAPSHOT_RESTORE_NAME=
SNAPSHOT_RESTORE_INDICES=index.name
SNAPSHOT_RESTORE_INDICES=['index.name']
SNAPSHOT_RESTORE_RENAME_PATTERN=
SNAPSHOT_RESTORE_RENAME_REPLACEMENT=restored_$1
SNAPSHOT_RESTORE_INCLUDE_ALIASES=True
DELETE_OLD_LOGS_DISABLE=False
SNAPSHOT_DISABLE=False
+3 −2
Original line number Diff line number Diff line
@@ -67,8 +67,9 @@ actions:
    options:
      repository: ${SNAPSHOT_REPOSITORY:s3-backup}
      name: ${SNAPSHOT_RESTORE_NAME}
      indices:
      - ${SNAPSHOT_RESTORE_INDICES}
      indices: ${SNAPSHOT_RESTORE_INDICES}
      rename_pattern: ${SNAPSHOT_RESTORE_RENAME_PATTERN}
      rename_replacement: ${SNAPSHOT_RESTORE_RENAME_REPLACEMENT:restored_$1}
      include_aliases: ${SNAPSHOT_RESTORE_INCLUDE_ALIASES:True}
      ignore_unavailable: True
      wait_interval: 30
+2 −0
Original line number Diff line number Diff line
@@ -12,6 +12,8 @@ services:
      SNAPSHOT_REPOSITORY:
      SNAPSHOT_RESTORE_NAME:
      SNAPSHOT_RESTORE_INDICES:
      SNAPSHOT_RESTORE_RENAME_PATTERN:
      SNAPSHOT_RESTORE_RENAME_REPLACEMENT:
      SNAPSHOT_RESTORE_INCLUDE_ALIASES:
      DELETE_OLD_LOGS_DISABLE: 'True'
      SNAPSHOT_DISABLE: 'True'