Skip to content

Prevent restoring snapshots to older releases#420

Merged
lildude merged 3 commits into
masterfrom
lildude/prevent-restore-to-older
Aug 6, 2018
Merged

Prevent restoring snapshots to older releases#420
lildude merged 3 commits into
masterfrom
lildude/prevent-restore-to-older

Conversation

@lildude

@lildude lildude commented Jul 29, 2018

Copy link
Copy Markdown
Member

As pointed out in https://github.com/github/backup-utils/issues/403, Backup Utilities currently allows snapshots to be restored to older releases of GitHub Enterprise than that of the snapshot, ie 2.14.x to 2.13.x.

This isn't supported and causes problems when the database migrations run as they're only intended to be run in ascending order.

This PR implements a block to stop attempts to restore snapshots of newer releases of GitHub Enterprise to older releases of GitHub Enterprise. Snapshots can still be restored to older patch releases of the same release, eg 2.14.2 to 2.14.0, as no migrations take in during patch releases.

Whilst I was at it, I also simplified the version checking for two other tests, though I'm contemplating removing these tests entirely as we don't mimic restores against 2.11.0 anymore.

Fixes https://github.com/github/backup-utils/issues/403

@lildude lildude added the bug label Jul 29, 2018
@lildude lildude requested a review from a team July 29, 2018 17:34
This ensures all the individual scripts also detect the version step 
down if run individually.
@lildude lildude merged commit 051149b into master Aug 6, 2018
@lildude lildude deleted the lildude/prevent-restore-to-older branch August 6, 2018 10:02
@lildude lildude mentioned this pull request Aug 7, 2018
dooleydevin added a commit that referenced this pull request Jul 21, 2023
…/boxofyellow/2023-06/mssql-backup_0

Backport 348 for 3.7: Allow the caller to handle setting failures
@dooleydevin dooleydevin mentioned this pull request Jul 21, 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