Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions backup.config-example
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ GHE_NUM_SNAPSHOTS=10
#
#GHE_RESTORE_HOST="github-standby.example.com"

# If set to 'yes', ghe-restore will omit the restore of audit logs.
#
#GHE_RESTORE_SKIP_AUDIT_LOGS=no

# When verbose output is enabled with `-v`, it's written to stdout by default. If
# you'd prefer it to be written to a separate file, set this option.
#
Expand Down
8 changes: 6 additions & 2 deletions bin/ghe-restore
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,12 @@ fi
# Restore exported audit and hookshot logs to 2.12.9 and newer single nodes and
# all releases of cluster
if $CLUSTER || [ "$(version $GHE_REMOTE_VERSION)" -ge "$(version 2.12.9)" ]; then
echo "Restoring Audit logs ..."
ghe-restore-es-audit-log "$GHE_HOSTNAME" 1>&3
if [[ "$GHE_RESTORE_SKIP_AUDIT_LOGS" = "yes" ]]; then
echo "Skipping restore of audit logs."
else
echo "Restoring Audit logs ..."
ghe-restore-es-audit-log "$GHE_HOSTNAME" 1>&3
fi

echo "Restoring hookshot logs ..."
ghe-restore-es-hookshot "$GHE_HOSTNAME" 1>&3
Expand Down