Repository navigation
fix(restore): let the same --fresh command finish a failed recovery - #37
Open
T3ST3ST3R0N wants to merge 1 commit into
Open
T3ST3ST3R0N wants to merge 1 commit into
T3ST3ST3R0N wants to merge 1 commit into
Conversation
Follow-up from the review of #34 (F4). A --fresh run that failed after installing .env and docker-compose.yml left non-empty directories and a database container, so running the same command again was refused, and the only way on was an ordinary restore. - Once .env and the Compose file are installed, --fresh writes APP_DIR/.pasarguard-fresh-restore with the SHA256 of the backup's checksum inventory. A successful restore removes it. - Running --fresh again with that marker continues as an ordinary restore of the provisioned installation, after checking that the archive is the same backup. Nothing is rolled back or deleted. - A failed continuation does not start the services of the half-provisioned installation. - Backups and restores skip the marker file. - tests: unit cases for the marker, the continuation and a different backup; a failing-healthcheck variant of the real fresh round trip, also run in CI for PostgreSQL.
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up from the review of #34.
A
--freshrun that failed after installing.envanddocker-compose.yml(for example when the database never became ready) left non-empty directories and a database container behind, so running the same command again was refused. The only way on was an ordinary restore..envand the Compose file are installed,--freshwritesAPP_DIR/.pasarguard-fresh-restorewith the SHA256 of the backup's checksum inventory. A successful restore removes it.--freshagain with that marker continues as an ordinary restore of the provisioned installation, after checking that the archive is the same backup; a different backup is refused. Nothing is rolled back or deleted.pasarguard installremoves a leftover marker, so a later--freshcannot continue into the new installation.Known small leftover: a continued
--freshstill makes the usual pre-restore copies of the half-provisioned directories. Skipping them touches the same lines as #35, so I'll add it after #35 lands, to keep the two PRs free of conflicts.Tests: unit cases for the marker, the continuation and a different backup (red against
main).tests/fresh_recovery_roundtrip.shgets afailing-healthcheckmode: the first--freshfails, and the same command again must finish the recovery. CI runs it for PostgreSQL, and it passes locally with Docker.