File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
share/github-backup-utils Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -61,11 +61,11 @@ if [ -s "$tmp_list" ]; then
61
61
if $CLUSTER || [ -n " $configured " ]; then
62
62
for index in $( cat $tmp_list | sed ' s/\.gz$//g' ) ; do
63
63
ghe_verbose " * Restoring $index "
64
- echo " export PATH=\$ PATH:/usr/local/share/enterprise && gzip -dc $GHE_REMOTE_DATA_USER_DIR /elasticsearch-restore/$index | ghe-es-load-json 'http://localhost:9201/$index '" |
64
+ echo " export PATH=\$ PATH:/usr/local/share/enterprise && sudo gzip -dc $GHE_REMOTE_DATA_USER_DIR /elasticsearch-restore/$index | ghe-es-load-json 'http://localhost:9201/$index '" |
65
65
ghe-ssh " $GHE_HOSTNAME " -- /bin/bash 1>&3
66
66
done
67
67
68
- ghe-ssh " $GHE_HOSTNAME " -- " sudo rm $GHE_REMOTE_DATA_USER_DIR /elasticsearch-restore/*.gz" 1>&3
68
+ ghe-ssh " $GHE_HOSTNAME " -- " sudo sh -c ' rm $GHE_REMOTE_DATA_USER_DIR /elasticsearch-restore/*.gz' " 1>&3
69
69
fi
70
70
71
71
rm $tmp_list
Original file line number Diff line number Diff line change @@ -48,11 +48,10 @@ if [ -s "$tmp_list" ]; then
48
48
if $CLUSTER || [ -n " $configured " ]; then
49
49
for index in $( cat $tmp_list | sed ' s/\.gz$//g' ) ; do
50
50
ghe_verbose " * Restoring $index "
51
- echo " export PATH=\$ PATH:/usr/local/share/enterprise && gzip -dc $GHE_REMOTE_DATA_USER_DIR /elasticsearch-restore/$index | ghe-es-load-json 'http://localhost:9201/$index '" |
51
+ echo " export PATH=\$ PATH:/usr/local/share/enterprise && sudo gzip -dc $GHE_REMOTE_DATA_USER_DIR /elasticsearch-restore/$index | ghe-es-load-json 'http://localhost:9201/$index '" |
52
52
ghe-ssh " $GHE_HOSTNAME " -- /bin/bash 1>&3
53
53
done
54
-
55
- ghe-ssh " $GHE_HOSTNAME " -- " sudo rm $GHE_REMOTE_DATA_USER_DIR /elasticsearch-restore/*.gz" 1>&3
54
+ ghe-ssh " $GHE_HOSTNAME " -- " sudo sh -c 'rm $GHE_REMOTE_DATA_USER_DIR /elasticsearch-restore/*.gz'" 1>&3
56
55
fi
57
56
58
57
rm $tmp_list
You can’t perform that action at this time.
0 commit comments