Add CKAN database restore tool - #12
Merged
Merged
Conversation
Add restore script and Docker image for reliable CKAN database restore from S3 backups. Uses download-first approach to avoid streaming pressure that was causing broken pipe errors on large backups. Script includes: - Download backup from S3 with automatic retries - Decompress locally - Restore from file using pg_restore This avoids the streaming approach that was failing after 60-70 minutes on 49GB backups. Ready for Integration account ECR push.
- Sort imports according to ruff style - Remove unused shutil import - Remove unused datetime import
Move pathlib import before third-party imports
This is a standalone utility script not part of the main application
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.
Add restore script and Docker image for reliable CKAN database restore.
Uses download-first approach instead of streaming to avoid broken pipe errors on large backups (49GB+).
What it does:
Why: Old streaming approach kept failing after 60-70 minutes when pg_restore stalled during index building.
Ready to build in GitHub Actions and push to Integration ECR.