Skip to content

Track completeness of Elasticsearch JSON dumps#298

Merged
snh merged 1 commit into
masterfrom
trackcomplete
Apr 8, 2017
Merged

Track completeness of Elasticsearch JSON dumps#298
snh merged 1 commit into
masterfrom
trackcomplete

Conversation

@snh

@snh snh commented Apr 7, 2017

Copy link
Copy Markdown
Member

Resolves an issue that can lead to incomplete JSON dumps of the audit_log and hookshot-logs Elasticsearch indices.

Take for example Audit Logs, which are stored in an index per month,

During a backup, existing dumps of indexes from previous months are reused by creating a hard-link to them if they exist in the previous snapshot, and not re-transferred. Only the current month is re-transferred on each backup run.

As the dumps for a previous month are likely to have been taken during that month, and not after the month had concluded, these dumps may be incomplete.

This PR updates this logic, so that we will reuse an existing monthly dump only if it was taken after that month has concluded, ensuring it is a complete and final snapshot of the month in question.

The same applies to Hookshot Logs, which are stored in an index per day.

As these dumps are only used when restoring to Cluster, this issue only impacts customers using GitHub Enterprise Cluster at this time. Restores to non-cluster appliances uses a raw Elasticsearch backup which is not impacted by this issue.

cc @github/backup-utils for review.

@rubiojr rubiojr added the bug label Apr 7, 2017
@snh snh merged commit 05eb5d2 into master Apr 8, 2017
@snh snh deleted the trackcomplete branch April 8, 2017 06:37
@snh snh mentioned this pull request Jun 7, 2017
jeluhu pushed a commit that referenced this pull request Jun 12, 2023
Verify software requirements are installed
@jeluhu jeluhu mentioned this pull request Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants