Secure Compress Restore Encrypt Archive Migrate
Your friendly neighborhood database superhero for MariaDB and MySQL backups!
SCREAM is your all-in-one solution for protecting, compressing, and safely storing your precious database data. Think of it as a Swiss Army knife for database backups that actually cares about your peace of mind!
Instead of creating monolithic backup files that are a pain to work with, SCREAM intelligently breaks down your database into modular components:
- π Schema - Database structure and definitions
- πΎ Data - The actual table contents
- βοΈ FunctionSp - Functions and stored procedures
- π Views - Virtual tables for simplified access
- β‘ Triggers - Automated responses to data events
- π Events - Scheduled tasks and automation
This granular approach gives you incredible flexibility when you need to restore or migrate your data.
Under the hood, SCREAM uses a powerful combination of native MySQL tools and modern cloud technologies:
- π Smart Discovery - SCREAM identifies all database objects that need backing up
- π Parallel Processing - Multiple backup tasks run simultaneously for maximum speed
- π¦ Optimized Compression - The
xz
utility compresses your data with configurable threads - π Strong Encryption - AES-256-CBC encryption with 20,000 PBKDF2 iterations
- βοΈ Intelligent Uploading - Automatic switching between single and multi-part uploads
- π Memory Efficiency - Advanced memory recycling prevents out-of-memory errors
- π§© Modular backups - Restore only what you need (Schema, Data, FunctionSp, Views, Triggers, Events)
- π Security first - End-to-end encryption keeps your data safe
- πΎ Space efficient - Advanced compression saves storage costs
- βοΈ Cloud ready - Direct upload to your favorite S3 storage
- π User friendly - Clean web interface makes complex operations simple
- π³ Zero friction - Jump right in with our Docker container
- π‘οΈ Rock-solid Logical Backups: Extract database elements by component (Schema, Data, FunctionSp, Views, Triggers, Events)
- π Bank-grade Encryption: Military-strength protection with
openssl enc
(AES-256-CBC with PBKDF2) - π¦ Super Compression: Save space with efficient
xz
compression - βοΈ Cloud Archiving: Automatic uploads to Backblaze B2 or any S3 storage
- π Surgical Restoration: Rebuild specific database components when needed
- π’ Effortless Migration: Move databases between environments without stress
- π₯οΈ Beautiful Interface: Intuitive Blazor WASM UI makes management easy
- π± Run Anywhere: Lightweight Docker container works everywhere
- π§΅ Multi-threaded Operations: Parallel processing for each database component
- π Smart Upload Logic: Automatically switches between single-part and multi-part uploads
- π§ Memory-efficient Processing: Recyclable memory streams prevent out-of-memory errors
- π Detailed Progress Tracking: Real-time reporting on backup status
- π‘οΈ Performance Metrics: Track backup speed and processing time
- π Comprehensive Error Handling: Automatic cleanup of failed uploads
- π· Backend: .NET 8+ (fast, modern, and reliable)
- π Frontend: Blazor WebAssembly (smooth UI without JavaScript headaches)
- π§ CLI Tools:
openssl enc
- The gold standard in encryptionxz
- The compression championmysql
client - Rock-solid database interaction
- π Libraries:
- AWSSDK.S3 - Reliable cloud storage integration
- Dapper - Lightning-fast database queries
- CliWrap - Elegant command-line operations
- MySqlConnector - Bulletproof database connectivity
- π³ Container: Docker (because who has time for dependency hell?)
You'll need:
- π³ Docker installed on your system
- ποΈ Access to a MariaDB or MySQL database
- βοΈ S3-compatible storage account credentials
- π· .NET 8+ SDK (only if you're developing outside Docker)
SCREAM is designed to be efficient with your resources, but for best performance:
- π§ Memory: 2GB minimum, 4GB+ recommended for large databases
- π½ CPU: Multi-core processor (SCREAM scales with available cores!)
- π Network: Good upload bandwidth for cloud storage transfer
# Pull our Docker image
docker pull ghcr.io/username/scream:latest
# Run it (will use demo mode with sample settings)
docker run -p 8080:80 --name scream-quick ghcr.io/username/scream:latest
# Visit http://localhost:8080 and you're in!
-
Clone the repo:
git clone https://github.com/username/scream.git cd scream
-
Build and launch:
docker build -t scream:latest . docker run -p 8080:80 -v $(pwd)/config:/app/config scream:latest
-
Visit http://localhost:8080 and start SCREAMing! π±
Want to build from source? We've got you covered:
-
Install the prerequisites:
- .NET 8+ SDK
- openssl, xz, and mysql client tools
-
Clone and prep:
git clone https://github.com/username/scream.git cd scream dotnet restore
-
Launch:
dotnet run --project Scream.Web
-
Visit http://localhost:5000 and enjoy!
Create a config/appsettings.json
file with your settings:
{
"MySqlBackup": {
"HostName": "your-db-server",
"UserName": "your-user",
"Password": "your-password",
"EncryptionKey": "your-very-secure-encryption-key",
"BucketName": "your-backup-bucket",
"BackupFolder": "my-backups",
"MaxPacketSize": "1073741824",
"Threads": "4",
"BackblazeB2": {
"ServiceURL": "s3.us-west-000.backblazeb2.com",
"AccessKey": "your-b2-access-key",
"SecretKey": "your-b2-secret-key"
}
}
}
Pro tip: All settings can be configured through environment variables too!
export MYSQL_BACKUP_HOSTNAME="your-db-server"
export MYSQL_BACKUP_USERNAME="your-user"
export MYSQL_BACKUP_PASSWORD="your-password"
export MYSQL_BACKUP_ENCRYPTION_KEY="your-very-secure-encryption-key"
export MYSQL_BACKUP_BUCKET_NAME="your-backup-bucket"
export MYSQL_BACKUP_FOLDER="my-backups"
export MYSQL_BACKUP_MAX_PACKET_SIZE="1073741824"
export MYSQL_BACKUP_THREADS="4"
export MYSQL_BACKUP_B2_SERVICE_URL="s3.us-west-000.backblazeb2.com"
export MYSQL_BACKUP_B2_ACCESS_KEY="your-b2-access-key"
export MYSQL_BACKUP_B2_SECRET_KEY="your-b2-secret-key"
- Open the web UI and go to the "Backup" tab
- Select your database connection (or enter a new one)
- Choose what to include (Schema, Data, FunctionSp, Views, Triggers, Events)
- Set encryption options (we recommend AES-256-CBC)
- Pick your S3 bucket details
- Click "Start Backup" and watch the magic happen!
When you click that "Start Backup" button:
- SCREAM queries your database to discover all objects needing backup
- Each component is processed in parallel (using the thread count you configured)
- For each component:
- The appropriate
mysqldump
command is executed with optimized flags - Output is piped directly to
xz
for compression - Compressed data is piped to
openssl
for encryption - Encrypted data is streamed directly to S3 storage
- The appropriate
- Large backups are automatically split into multi-part uploads
- Detailed logs track the progress of each step
- Navigate to the "Restore" tab
- Browse your S3 buckets or upload a local backup
- Select which components to restore
- Choose destination database
- Hit "Start Restore" and grab a coffee while SCREAM works
- Go to the "Migration" tab
- Set up your source and destination connections
- Select components to migrate
- Click "Start Migration" and relax
- Can't connect to database? Double-check your connection string and ensure network access
- S3 uploads failing? Verify your credentials and bucket permissions
- Slow backups? Try adjusting:
- The number of threads (
MYSQL_BACKUP_THREADS
) - The compression level in the xz command (currently set to
-3
) - The maximum packet size (
MYSQL_BACKUP_MAX_PACKET_SIZE
)
- The number of threads (
- Memory errors? Adjust the RecyclableMemoryStreamManager settings or decrease thread count
- Timeouts on large tables? Increase the connection timeout in your MySQL settings
- CPU-bound? Increase the thread count to match your available cores
- Network-bound? Adjust compression level (higher = smaller files but slower processing)
- Memory-bound? Adjust the MaximumBufferSize and pool settings
Need more help? Open an issue on GitHub or check our Wiki!
We'd love your help making SCREAM even better! Here's how:
- Fork the repository
- Create your feature branch (
git checkout -b amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin amazing-feature
) - Open a Pull Request
Even small improvements are welcome!
SCREAM is licensed under the MIT License Β© 2025 Spire Recovery Solutions.
This project stands on the shoulders of giants with these dependencies:
- .NET 8+ & Blazor WASM: MIT License
- AWSSDK.S3: Apache License 2.0
- Dapper: Apache License 2.0
- CliWrap: MIT License
- MySqlConnector: MIT License
- openssl enc: OpenSSL License
- xz: Public Domain/LGPL
- mysql client: GPL v2
Made with β€οΈ by database enthusiasts who've lost data one too many times.
Remember: The best backup is the one you actually have when you need it!