A modern desktop application for restoring SQL Server databases from Azure Blob Storage backups. Built with WPF on .NET 8, featuring a dark-mode UI, intelligent backup chain detection, point-in-time recovery, and secure credential management.
Download the latest release from the Releases page.
- Connect to Azure Blob Storage containers using SAS tokens
- Automatic discovery of backup files (Full, Differential, Transaction Log)
- Intelligent parsing of blob path structures with customisable patterns
- Support for striped backup sets (multiple files per backup)
- Secure SAS token storage using Windows Credential Manager
- Windows Authentication and SQL Server Authentication support
- Configurable connection options (Encrypt, Trust Server Certificate, Timeout)
- Persistent server configurations with secure password storage
- Real-time connection status visible across all views
- Browse all backups in a container with filtering by server, database, and type
- Automatic inference of database names from folder structures
- Configurable blob path pattern builder with drag-and-drop components
- Summary statistics showing backup set counts (not just file counts)
- Visual timeline showing all available restore points
- Colour-coded dots for Full (blue), Differential (orange), and Log (green) backups
- Clickable restore points with automatic chain calculation
- Intelligent backup chain building including all required differentials
- Complete T-SQL restore scripts with proper
FROM URLsyntax - No SAS token or credential in scripts – the generated script never contains credentials; the SQL Server must already have a credential for the blob container URL (or you create it from the app)
- Restore options show whether the blob credential exists on the connected server; optional "Create credential on server" so you can create/update it without putting the token in any script
- Support for all common restore options:
WITH REPLACE- Overwrite existing databaseWITH MOVE- Relocate data/log files (auto-detects server default paths)- Recovery modes:
RECOVERY,NORECOVERY,STANDBY KEEP_REPLICATION,ENABLE_BROKER,NEW_BROKER- Configurable
STATSpercentage
- Disconnect sessions option (
SET SINGLE_USER WITH ROLLBACK IMMEDIATE)
- Execute restore scripts directly against connected SQL Server instances
- Real-time progress logging with auto-scroll
- Safe "arm-to-execute" confirmation
- Full restore chain execution with progress feedback in execution console
Configure Azure Blob Storage containers with SAS tokens. Drag-and-drop path pattern builder for custom folder structures.
Browse all backups with filtering by server, database, and backup type. Summary shows set counts accounting for striped backups.
Visual timeline with clickable restore points. Select any point to see the complete restore chain required.
Configure restore options including WITH MOVE with auto-detected server paths, recovery mode, and more.
Generate restore scripts or execute directly with real-time progress logging.
Download the latest release from the Releases page.
The application is distributed as a single self-contained executable (SQLRestoreFromBlob.exe) - no installation required. Simply download and run.
Requirements:
- Windows 10/11 (x64)
- No .NET runtime installation required (self-contained)
- .NET 8 SDK or later
- Windows 10/11 (WPF application)
git clone https://github.com/jakemorgangit/SQLRestoreFromBlob.git
cd SQLRestoreFromBlob
dotnet builddotnet run --project src/SQLRestoreFromBlobdotnet publish src/SQLRestoreFromBlob -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ./publishThe executable will be created at ./publish/SQLRestoreFromBlob.exe.
- Navigate to Blob Storage in the sidebar
- Click + Add Container
- Enter a display name for the container
- Enter the full container URL (e.g.,
https://mystorageaccount.blob.core.windows.net/sqlbackups) - Enter your SAS token (with at least
listandreadpermissions) - Configure the Blob Path Structure to match your backup folder layout:
- Default:
{BackupType}/{ServerName}/{DatabaseName}/{FileName} - Drag and drop components to rearrange
- Add
{InstanceName}if your paths include SQL instance names
- Default:
- Click Test Connection to verify access
- Click Save
- Navigate to SQL Servers in the sidebar
- Click + Add Server
- Enter server details and authentication method
- Configure encryption and certificate options as needed
- Click Test Connection to verify
- Click Save
- Select the server and click Connect to establish a session
- Navigate to Browse Backups in the sidebar
- Select your configured container from the dropdown
- Click Load Backups
- Use filters to narrow down by server, database, or backup type
- Review the summary showing backup set counts
- Navigate to Restore in the sidebar
- Select your container and click Load Backups
- Filter by server/database if needed
- Click a restore point on the timeline (or in the list)
- Review the restore chain in the details panel
- Configure restore options:
- Target Database Name - Name for the restored database
- WITH REPLACE - Overwrite if database exists
- WITH MOVE - Relocate files (paths auto-detected from connected server)
- Recovery Mode - RECOVERY (online), NORECOVERY (for more restores), or STANDBY
- Click Generate Script to create the T-SQL
- Either:
- Copy to Clipboard or Save to File to run manually in SSMS
- Execute on Server to run directly (requires connected SQL Server)
When clicking Execute on Server:
- The button changes to "Confirm Execute (5)" with a countdown
- A warning banner appears showing the target server and database
- Click the button again within 5 seconds to confirm
- Watch the real-time execution log for progress
- Upon completion, the database is restored and online (if RECOVERY mode selected)
Your SAS token needs the following minimum permissions:
- List (l) - To enumerate blobs in the container
- Read (r) - To read backup files
For restore execution, the SQL Server instance must have a credential for the blob container URL (identity SHARED ACCESS SIGNATURE). You can create or update this credential from the app using "Create credential on server" in the Restore options; the SAS token is never included in generated scripts.
Example SAS token permissions: sp=rl (read + list)
Recommended: sp=racwdl (read, add, create, write, delete, list) for full functionality.
The application parses backup file paths to infer metadata. Configure the path pattern to match your structure.
{BackupType}/{ServerName}/{DatabaseName}/{FileName}
Example paths:
FULL/SQLSERVER01/AdventureWorks/20240115_220000_1.bak
DIFF/SQLSERVER01/AdventureWorks/20240116_060000_1.bak
LOG/SQLSERVER01/AdventureWorks/20240116_070000.trn
{BackupType}/{ServerName}/{InstanceName}/{DatabaseName}/{FileName}
Example:
FULL/SQLSERVER01/MSSQLSERVER/AdventureWorks/20240115_220000.bak
The application automatically detects striped backup sets by filename pattern:
20240115_220000_1.bak
20240115_220000_2.bak
20240115_220000_3.bak
20240115_220000_4.bak
These are grouped as a single backup set with 4 files.
The application builds complete restore chains automatically:
- Full Backup - Always required as the base
- Differential Backups - All differentials since the last full (incremental chain)
- Transaction Logs - All logs after the last differential (or full if no diffs)
When you select a transaction log restore point, the chain includes:
- The most recent full backup before that log
- All differential backups between the full and the log
- All transaction logs from the last differential to your selected point
- SAS Tokens - Stored securely in Windows Credential Manager
- SQL Passwords - Stored securely in Windows Credential Manager
- Configuration - Non-sensitive settings stored in
%LOCALAPPDATA%\SQLRestoreFromBlob\config.json
- After save, the token is never shown again – once a SAS token is saved for a container, it cannot be viewed in the UI; you can only replace it by entering a new token. This reduces the risk of exposure.
- For new containers (before save), you can type the token and optionally show/hide it while editing.
Built with:
- .NET 8 (LTS) - Windows Presentation Foundation (WPF)
- CommunityToolkit.Mvvm - MVVM pattern implementation
- Azure.Storage.Blobs - Azure Blob Storage SDK
- Microsoft.Data.SqlClient - SQL Server connectivity
SQLRestoreFromBlob/
├── src/
│ └── SQLRestoreFromBlob/
│ ├── Assets/ # Application icon
│ ├── Converters/ # XAML value converters
│ ├── Models/ # Data models
│ ├── Services/ # Business logic services
│ ├── Themes/ # Dark theme resources
│ ├── ViewModels/ # MVVM ViewModels
│ └── Views/ # XAML views
├── publish/ # Published executable
└── SQLRestoreFromBlob.sln # Solution file
- Windows only (WPF application)
- x64 architecture only
- SAS token authentication only (no Azure AD/Managed Identity yet)
- Single container per restore operation
- No differential backup "skip" - all diffs in range are restored
- Verify your SAS token has
listpermission - Check the token hasn't expired
- Ensure the container URL is correct (no trailing slash)
- Enable WITH MOVE option
- Connect to SQL Server first to auto-detect default paths
- Manually specify data/log file paths
- This is expected if you selected NORECOVERY mode
- Run
RESTORE DATABASE [YourDB] WITH RECOVERYto bring it online
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Jake Morgan - Blackcat Data Solutions Ltd
- UI design inspired by Erik Darling's SQL Performance tools
- Built with CommunityToolkit.Mvvm





