Skip to content
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

add long term backup support with ghe-preserve #609

Draft
wants to merge 1 commit into
base: master
from

Conversation

@cvega
Copy link
Member

@cvega cvega commented May 11, 2020

We have a couple of teams on services that are interested in preserving backups long term to meet specific compliance needs. To meet this need we created a ghe-preserve.

Looking to get feedback to see if something like this would be useful for inclusion.

What it does:

  • create a date and hour range matching strategy
    • hourly snapshots for 48 hours
    • 14 days
    • 8 weeks (sunday)
    • 24 months
    • 5 years
  • files matching the generated times/dates are copied to a 'preserve' folder assuming they do not already exist
  • files in the preserve folder not matching hourly and dates are deleted
    • special care taken for edge cases (e.g. 48 hours can span 3 calendar days)

Other

  • It never modifies an existing snapshot
  • shellcheck mostly happy
  • I did not update ghe-backup-config to include the preserve path, probably should
  • I'm using arrays in a few places despite the style guide. I'd be interested in feedback and learning more in terms of avoiding this
  • I didn't make it configurable because date time work coupled with deleting directories is honestly pretty scary and having a single state is easier.
  • Not knowing a ton about how these snapshots work, is moving this data even viable for a restore assuming a user had to restore a snapshot from for example 18 months ago.
@cvega cvega marked this pull request as draft May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.