diff --git a/backup.config-example b/backup.config-example index 1cfe29fb4..7c46142fc 100644 --- a/backup.config-example +++ b/backup.config-example @@ -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. # diff --git a/bin/ghe-restore b/bin/ghe-restore index ea431ebb2..f01beec19 100755 --- a/bin/ghe-restore +++ b/bin/ghe-restore @@ -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