Skip to content

Track completeness of Elasticsearch JSON dumps #298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2017
Merged

Conversation

snh
Copy link
Member

@snh snh commented Apr 7, 2017

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