A containerized Microsoft SQL Server environment with automated restore tooling from bak files, designed for local development and testing.
- Containerized SQL Server: Uses Podman Compose to orchestrate SQL Server and related services.
- Automated Backup Restore: Includes scripts to inspect
.bakfiles and generate SQL restore commands automatically. - Task Automation: Uses a
Justfilefor common operations like starting, stopping, rebuilding containers, and running checks. - Cross-platform: Designed for Windows with PowerShell support, but scripts are Bash-based for container compatibility.
just up— Start the SQL Server containers in the background.just down— Stop and remove the containers.just check— Run a health check script inside the SQL Server container.just logs— Follow container logs.just rebuild— Rebuild containers and re-import backups (can take a minute or more).
- Place your
.bakfiles in thebackups/directory (ignored by git). - Run
just rebuildto bring up the environment and trigger the import/inspection script. - The script will discard the current database by dropping the persistent volume inspect each backup, generate restore SQL, and attempt to restore databases automatically.
- Place your sql scripts in scripts/sql/DbName
- Run
just runsqlfiles DbName - The script will run the sql files in the directory against the named DB
Justfile— Task automation recipes.scripts/importinspect.sh— Bash script to inspect and restore.bakfiles.backups/— Place your SQL Server backup files here (not tracked by git)..gitignore— Ignores environment, backup, and temp files.
MIT License — see LICENSE for details.
This project was created and refined with the assistance of AI tools, including GitHub Copilot and other generative AI technologies. These tools were used to help generate scripts, documentation, and automation logic. All code and documentation have been reviewed and tested by a human before inclusion in this repository. Please review and validate any AI-generated content for your specific use case and environment.
- completely review scripts/importinspect.sh