File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
share/github-backup-utils Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -60,25 +60,20 @@ transfer_size()
60
60
esac
61
61
62
62
# Check if instance is cluster and fetch appropriate primary host for the different components
63
- ghe-ssh " $host " " [ -f /etc/github/cluster ]"
64
- cluster_status=$?
65
-
66
- if [[ $cluster_status -eq 0 ]]; then
67
- cluster_conf_out=$( ghe-ssh " $host " " cat /data/user/common/cluster.conf" )
63
+ if " $CLUSTER " ; then
68
64
cluster_nodes_output=$( ghe-ssh " $host " " ghe-cluster-nodes -i" )
69
65
case $1 in
70
- elasticsearch | storage | pages )
71
- cluster_host=$( echo " $cluster_conf_out " | awk -v srv= " $backup_data -server = true " ' /cluster/ { prevA = $0 } $0 ~ srv { print prevA } ' | head -1 | awk -F ' " ' ' {print $2} ' )
66
+ elasticsearch | storage | pages | actions | mssql )
67
+ cluster_host=$( ghe-ssh " $host " " ghe-cluster-nodes -r $backup_data " | head -1)
72
68
;;
73
69
mysql)
74
70
cluster_host=$( ghe-ssh " $host " " ghe-config cluster.mysql-master" )
75
71
;;
76
72
repositories)
77
- cluster_host=$( echo " $cluster_conf_out " | awk ' /git-server = true/ { print prevA } / cluster/ { prevA = $0 } ' | head -1 | awk -F ' " ' ' {print $2} ' )
73
+ cluster_host=$( ghe-ssh " $host " " ghe- cluster-nodes -r git " | head -1)
78
74
;;
79
75
* )
80
- echo " Unknown backup data: $1 "
81
- exit 1
76
+ exit 0
82
77
;;
83
78
esac
84
79
host=$( echo " $cluster_nodes_output " | grep " $cluster_host " | awk ' {print $2}' | head -1)
You can’t perform that action at this time.
0 commit comments