Skip to content

Commit 24a1512

Browse files
author
Boris
committed
v0.0.9 - add restore-date into snapshot's names
1 parent 3e223c0 commit 24a1512

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

front/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ <h5 class="card-header">Nodes</h5>
5555
</div>
5656
</div>
5757

58-
<div class="col-md-7">
58+
<div class="col-md-6">
5959

6060
<h1 class="my-4">Snapshots list
6161
<small id="selectedsnap"></small>
@@ -67,7 +67,7 @@ <h1 class="my-4">Snapshots list
6767
</div>
6868

6969
<!-- Sidebar Widgets Column -->
70-
<div class="col-md-3">
70+
<div class="col-md-4">
7171
<!-- Side Widget -->
7272
<div class="card my-4">
7373
<h5 class="card-header">Restored indices</h5>

mock/queries.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,17 @@ POST /_snapshot/my_repository/snapshot_2/_restore?wait_for_completion=false
9999
"include_global_state": false,
100100
"rename_pattern": "(.+)",
101101
"rename_replacement": "restored_$1",
102-
"include_aliases": false
102+
"include_aliases": false,
103+
"index_settings": {
104+
"index.number_of_replicas": 0
105+
},
106+
"ignore_index_settings": [
107+
"index.creation_date"
108+
]
103109
}
104110

105111

112+
106113
curl "http://localhost:9200/_snapshot/s3-backup/mp-2020.11.02/_restore?wait_for_completion=false" -H "Content-type: application/json" -d'
107114
{
108115
"indices": "boris,filebeat-2020.10.10", "ignore_unavailable": true, "include_global_state": false, "rename_pattern": "(.+)", "rename_replacement": "restored_$1", "include_aliases": false
@@ -160,4 +167,4 @@ curl -ks https://opendistro:9200/_cat/indices/restored*?health=green
160167
w.Write(response)
161168
}
162169

163-
} // end for
170+
} // end for

modules/front/bindata.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/router/r.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"path"
2323
"strings"
2424

25-
// "sync"
25+
"time"
2626

2727
"github.com/uzhinskiy/extractor/modules/config"
2828
"github.com/uzhinskiy/extractor/modules/front"
@@ -282,13 +282,13 @@ func (rt *Router) ApiHandler(w http.ResponseWriter, r *http.Request) {
282282
}
283283

284284
index_list_for_restore, index_list_not_restore := rt.Barrel(indices)
285-
285+
t := time.Now()
286286
req := map[string]interface{}{
287287
"ignore_unavailable": false,
288288
"include_global_state": false,
289289
"include_aliases": false,
290290
"rename_pattern": "(.+)",
291-
"rename_replacement": "restored_$1",
291+
"rename_replacement": fmt.Sprintf("restored_$1-%s",t.Format("02-01-2006")),
292292
"indices": index_list_for_restore,
293293
"index_settings": map[string]interface{}{"index.number_of_replicas": 0},
294294
}

modules/version/v.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313

1414
package version
1515

16-
var Version = "extractor/v0.0.8"
16+
var Version = "extractor/v0.0.9"

0 commit comments

Comments
 (0)