DataCrud.DBOps.AzurePush
1.0.2
dotnet add package DataCrud.DBOps.AzurePush --version 1.0.2
NuGet\Install-Package DataCrud.DBOps.AzurePush -Version 1.0.2
<PackageReference Include="DataCrud.DBOps.AzurePush" Version="1.0.2" />
<PackageVersion Include="DataCrud.DBOps.AzurePush" Version="1.0.2" />
<PackageReference Include="DataCrud.DBOps.AzurePush" />
paket add DataCrud.DBOps.AzurePush --version 1.0.2
#r "nuget: DataCrud.DBOps.AzurePush, 1.0.2"
#:package DataCrud.DBOps.AzurePush@1.0.2
#addin nuget:?package=DataCrud.DBOps.AzurePush&version=1.0.2
#tool nuget:?package=DataCrud.DBOps.AzurePush&version=1.0.2
DataCrud.DBOps
DataCrud.DBOps is a premium, high-performance database maintenance and job orchestration library for .NET. Designed to bridge the gap between modern cloud-native architectures and legacy enterprise systems, it provides a unified interface for database backups, index optimization, and real-time operational monitoring.
✨ Key Features
- ⚡ Intelligent Maintenance: Automated database shrinking and sophisticated index management (Reorganize/Rebuild) to ensure peak performance.
- 🛡️ Resilient Backups: Automated full-database backup workflows with high-ratio compression and integrity verification.
- ☁️ Multi-Cloud Sync: Native, high-performance integration with AWS S3 and Azure Blob Storage for off-site redundancy.
- 📊 Embedded Dashboard: A stunning, lightweight operational dashboard built with HTMX and Alpine.js, providing real-time job control and log visibility.
- 📝 Centralized Logging: Robust
IJobStoragearchitecture supporting SQL Server and LiteDB, featuring parent/child log relationships for granular auditing. - 🚀 Cross-Platform Heritage: First-class support for ASP.NET Core (DI-friendly) and Legacy .NET Framework (OWIN/Console).
🏗️ Architecture: Centralized History
Unlike traditional maintenance scripts, DBOps utilizes a centralized orchestration engine. All database providers report to a unified IJobStorage backend, ensuring that your maintenance history is consistent across all servers.
- Parent Logs: Summary of job type, execution status, and duration.
- Child Logs: Detailed execution traces, warnings, and error stack traces for every step of the process.
🛠 Supported Ecosystem
💻 Getting Started
1. Modern .NET (ASP.NET Core)
Install the core and your preferred provider via NuGet:
dotnet add package DataCrud.DBOps.AspNetCore
dotnet add package DataCrud.DBOps.SqlServer
Configure with Dependency Injection:
builder.Services.AddDBOps(options =>
{
// Configure Storage (Centralized History)
options.Storage = new SqlServerJobStorage("YourHistoryDbConnectionString");
// Multi-Cloud Sync
options.PushToAws = true;
options.AwsBucketName = "bucket-name";
options.AwsRegion = "us-east-1";
});
2. Multi-Database Configuration
DBOps is designed to manage multiple database instances (and different providers) simultaneously from a single dashboard.
builder.Services.AddDBOps(options =>
{
options.Storage = new LiteDbJobStorage("history.db");
// --- Zipping Configuration ---
options.EnableZipping = true; // Set false to skip compression (default: true)
options.BackupPath = "C:\\Backups"; // Custom local staging directory
// --- Azure Storage Configuration ---
// Backups will be pushed to the 'backups' container in 'databases/' folder
options.PushToAzure = true;
options.AzureStorageConnectionString = "DefaultEndpointsProtocol=https;AccountName=...";
// --- AWS S3 Configuration ---
options.PushToAws = true;
options.AwsAccessKey = "YOUR-ACCESS-KEY";
options.AwsSecretKey = "YOUR-SECRET-KEY";
options.AwsBucketName = "your-bucket-name";
options.AwsRegion = "us-east-1";
// --- Multi-Server Registration ---
options.Providers.Add(new SqlServerProvider("ConnString1", "Production ERP"));
options.Providers.Add(new PostgresProvider("PostgresConn", "Analytics App"));
// Enable "Discovery Mode" to automatically find all DBs on a server
options.Providers.Add(new SqlServerProvider("ServerConn", "Main Cluster", discover: true));
});
2. .NET Framework / Legacy (OWIN)
For legacy applications, install the AspNet integration:
Install-Package DataCrud.DBOps.AspNet
Configure in your Startup.cs:
public void Configuration(IAppBuilder app)
{
app.UseDBOps(options =>
{
options.DashboardPath = "/dbops";
options.Storage = new LiteDbJobStorage("jobs_dbops.db");
// Register your database providers
options.Providers.Add(new SqlServerProvider("YourConnectionString", "Data Server 01"));
});
}
2. Embedded Dashboard
Access the premium dashboard by mapping the middleware in your startup:
app.UseDatabaseOpsDashboard(options =>
{
options.Path = "/dbops";
options.Security.RequireAdminRole = true;
});
🔒 Security & Authentication
DBOps is secure by default. You can configure authentication for the dashboard using several methods:
1. Basic Authentication
The simplest way to protect your dashboard is using the built-in Basic Auth.
options.Security.Enabled = true; // Enabled by default
options.Security.Username = "admin";
options.Security.Password = "strong-password-here";
2. Role-Based Authorization
If your application uses ASP.NET Identity or OWIN Security, you can restrict access to specific roles:
options.Security.AllowedRoles = new[] { "Administrator", "DBManager" };
3. Custom Authorization Filters
For advanced security requirements (IP filtering, custom headers, etc.), implement IDBOpsAuthorizationFilter:
options.Security.AuthorizationFilters.Add(new MyCustomAuthFilter());
3. Scheduling & Background Jobs
You can easily automate your database maintenance using popular schedulers like Hangfire or native .NET Background Services.
Using Hangfire
// In your Startup or Program.cs
RecurringJob.AddOrUpdate<MaintenanceManager>(
"daily-backup",
manager => manager.RunAsync("MyDatabase", true, true, true, true, true, "C:\\Backups", 7, true, null, default),
Cron.Daily
);
Using .NET BackgroundService
public class DatabaseBackupWorker : BackgroundService
{
private readonly IServiceProvider _serviceProvider;
public DatabaseBackupWorker(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
using (var scope = _serviceProvider.CreateScope())
{
var manager = scope.ServiceProvider.GetRequiredService<MaintenanceManager>();
await manager.RunAsync("MyDatabase", backup: true, shrink: true, index: true,
reorganize: true, cleanup: true, backupDir: "C:\\Backups");
}
// Wait 24 hours
await Task.Delay(TimeSpan.FromHours(24), stoppingToken);
}
}
}
📜 Professional Services & Support
DataCrud.DBOps is maintained for enterprise-grade stability. For custom provider development or specialized cloud integrations, please reach out to the DataCrud team.
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Azure.Identity (>= 1.11.4)
- Azure.Storage.Blobs (>= 12.21.2)
- DataCrud.DBOps.Shared (>= 1.0.2)
- Microsoft.Identity.Client (>= 4.61.3)
- Npgsql (>= 8.0.3)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on DataCrud.DBOps.AzurePush:
| Package | Downloads |
|---|---|
|
DataCrud.DBOps.Core
Slim Core for DataCrud.DBOps. Provides the engine, dashboard assets, and provider interfaces. |
|
|
DataCrud.DBOps.Backup
Cloud-integrated backup service for DataCrud.DBOps. Supports Azure and AWS storage integration. |
GitHub repositories
This package is not used by any popular GitHub repositories.