File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
jobs/elasticsearch-platform Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -152,4 +152,7 @@ properties:
152
152
default: ''
153
153
elasticsearch.migrate_data:
154
154
description: migrate data from /var/vcap/store/elasticsearch to /var/vcap/store/elasticsearch-platform
155
+ default: false
156
+ elasticsearch.delete_migrated_data:
157
+ description: delete /var/vcap/store/elasticsearch
155
158
default: false
Original file line number Diff line number Diff line change 36
36
37
37
< % if p(" elasticsearch.migrate_data" ) %>
38
38
if [[ -d /var/vcap/store/elasticsearch ]]; then
39
- cp -pRu /var/vcap/store/elasticsearch/nodes /var/vcap/store/elasticsearch-platform
39
+ mkdir /var/vcap/store/elasticsearch-platform || true
40
+ rsync -au --delete /var/vcap/store/elasticsearch/nodes /var/vcap/store/elasticsearch-platform/nodes
41
+ fi
42
+ < % end %>
43
+
44
+ < % if p(" elasticsearch.delete_migrated_data" ) %>
45
+ if [[ -d /var/vcap/store/elasticsearch && -d /var/vcap/store/elasticsearch-platform ]]; then
46
+ if cat /var/vcap/jobs/elasticsearch-platform/config/elasticsearch.yml | grep -q ' data: "/var/vcap/store/elasticsearch-platform"' ; then
47
+ rm -rf /var/vcap/store/elasticsearch
48
+ fi
40
49
fi
41
50
< % end %>
You can’t perform that action at this time.
0 commit comments