File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
jobs/elasticsearch-platform Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -149,4 +149,7 @@ properties:
149
149
default: ''
150
150
elasticsearch.snapshots.repository:
151
151
description: Repository name for automatic snapshots
152
- default: ''
152
+ default: ''
153
+ elasticsearch.migrate_data:
154
+ description: migrate data from /var/vcap/store/elasticsearch to /var/vcap/store/elasticsearch-platform
155
+ default: false
Original file line number Diff line number Diff line change @@ -26,9 +26,16 @@ chown root:vcap /var/vcap/jobs/elasticsearch-platform/config/jvm.options
26
26
log_dir=/var/vcap/packages/elasticsearch-platform/logs
27
27
28
28
if [[ -d ${log_dir} ]]; then
29
- rmdir ${log_dir}
29
+ # rmdir fails on a symlink
30
+ rmdir ${log_dir} || rm ${log_dir}
30
31
fi
31
32
32
33
if [[ ! -a ${log_dir} ]]; then
33
34
ln -s /var/vcap/sys/log/elasticsearch-platform ${log_dir}
34
- fi
35
+ fi
36
+
37
+ < % if p(" elasticsearch.migrate_data" ) %>
38
+ if [[ -d /var/vcap/store/elasticsearch ]]; then
39
+ cp -pR /var/vcap/store/elasticsearch/nodes /var/vcap/store/elasticsearch-platform
40
+ fi
41
+ < % end %>
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ bootstrap:
3
3
4
4
path:
5
5
logs: "/var/vcap/sys/log/elasticsearch-platform"
6
- data: "/var/vcap/store/elasticsearch"
6
+ data: "/var/vcap/store/elasticsearch-platform "
7
7
<% if p('elasticsearch.path_repo') != '' %>
8
8
repo: ["<%= p('elasticsearch.path_repo') %> "]
9
9
<% end %>
You can’t perform that action at this time.
0 commit comments