Skip to content

Commit 0d129ca

Browse files
committed
do not exclude audit log ES indices
1 parent afe17b5 commit 0d129ca

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

share/github-backup-utils/ghe-backup-es-rsync

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,6 @@ fi
2727
# Make sure root backup dir exists if this is the first run
2828
mkdir -p "$GHE_SNAPSHOT_DIR/elasticsearch"
2929

30-
# Create exclude file
31-
exclude_file="$(mktemp)"
32-
echo elasticsearch.yml >"$exclude_file"
33-
34-
# Exclude audit log indices when configuration says so and import to MySQL is complete
35-
# as those indices will be rebuilt from MySQL during a restore
36-
if [ "$GHE_BACKUP_ES_AUDIT_LOGS" = "no" ] && ghe-ssh "$host" test -e "/data/user/common/audit-log-import/complete"; then
37-
ghe_verbose "* Excluding Audit Log indices"
38-
ghe-ssh "$host" curl -s 'http://localhost:9201/_cat/indices/audit_log?h=uuid' >>$exclude_file 2>&3
39-
fi
40-
4130
# Verify that the /data/elasticsearch directory exists.
4231
if ! ghe-ssh "$host" -- "[ -d '$GHE_REMOTE_DATA_USER_DIR/elasticsearch' ]"; then
4332
ghe_verbose "* The '$GHE_REMOTE_DATA_USER_DIR/elasticsearch' directory doesn't exist."
@@ -58,7 +47,6 @@ ghe-rsync -avz \
5847
-e "ghe-ssh -p $(ssh_port_part "$host")" \
5948
--rsync-path="sudo -u elasticsearch rsync" \
6049
$link_dest \
61-
--exclude-from="$exclude_file" \
6250
"$(ssh_host_part "$host"):$GHE_REMOTE_DATA_USER_DIR/elasticsearch/" \
6351
"$GHE_SNAPSHOT_DIR/elasticsearch" 1>&3
6452

@@ -67,7 +55,6 @@ cleanup () {
6755
ghe_verbose "* Enabling ES index flushing ..."
6856
echo '{"index":{"translog.disable_flush":false}}' |
6957
ghe-ssh "$host" -- curl -s -XPUT "localhost:9200/_settings" -d @- >/dev/null
70-
rm -rf "$exclude_file"
7158
}
7259
trap 'cleanup' EXIT
7360
trap 'exit $?' INT # ^C always terminate
@@ -84,7 +71,6 @@ ghe-rsync -avz \
8471
-e "ghe-ssh -p $(ssh_port_part "$host")" \
8572
--rsync-path="sudo -u elasticsearch rsync" \
8673
$link_dest \
87-
--exclude-from="$exclude_file" \
8874
"$(ssh_host_part "$host"):$GHE_REMOTE_DATA_USER_DIR/elasticsearch/" \
8975
"$GHE_SNAPSHOT_DIR/elasticsearch" 1>&3
9076

0 commit comments

Comments
 (0)