Skip to content

Commit 0a39e16

Browse files
authored
Add verbose output for audit log output
Assist with determining if incremental hard linking occurred for an index, or if a full dump was required.
1 parent 37901d5 commit 0a39e16

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

share/github-backup-utils/ghe-backup-es-audit-log

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ for index in $indices; do
4444
index_size=$2
4545

4646
if [[ -f $GHE_DATA_DIR/current/audit-log/$index_name.gz && $(cat $GHE_DATA_DIR/current/audit-log/$index_name.gz.size 2>/dev/null || true) -eq $index_size ]]; then
47+
ghe_verbose "* Linking unchanged audit log index: $index_name"
4748
# Hard link any indices that have not changed since the last backup
4849
ln $GHE_DATA_DIR/current/audit-log/$index_name.gz $GHE_SNAPSHOT_DIR/audit-log/$index_name.gz
4950
ln $GHE_DATA_DIR/current/audit-log/$index_name.gz.size $GHE_SNAPSHOT_DIR/audit-log/$index_name.gz.size
5051
else
52+
ghe_verbose "* Performing audit log export for index: $index_name"
5153
echo "/usr/local/share/enterprise/ghe-es-dump-json \"http://localhost:9201/$index_name\" | gzip" | ghe-ssh "$host" -- /bin/bash > $GHE_SNAPSHOT_DIR/audit-log/$index_name.gz
5254
echo $index_size > $GHE_SNAPSHOT_DIR/audit-log/$index_name.gz.size
5355
fi

0 commit comments

Comments
 (0)