DGL.GoogleDrive.SqlServer.Backup
1.0.2
See the version list below for details.
dotnet add package DGL.GoogleDrive.SqlServer.Backup --version 1.0.2
NuGet\Install-Package DGL.GoogleDrive.SqlServer.Backup -Version 1.0.2
<PackageReference Include="DGL.GoogleDrive.SqlServer.Backup" Version="1.0.2" />
paket add DGL.GoogleDrive.SqlServer.Backup --version 1.0.2
#r "nuget: DGL.GoogleDrive.SqlServer.Backup, 1.0.2"
// Install DGL.GoogleDrive.SqlServer.Backup as a Cake Addin #addin nuget:?package=DGL.GoogleDrive.SqlServer.Backup&version=1.0.2 // Install DGL.GoogleDrive.SqlServer.Backup as a Cake Tool #tool nuget:?package=DGL.GoogleDrive.SqlServer.Backup&version=1.0.2
- Backup database
- Upload files to google drive
How to use
- Add settings in appsettings.json:
{ "GoogleDriveUploading": { "Enabled": false, "BackupItems": [ // backup bak file in sql server { "Enabled": false, "ConnectionString": "", "DatabaseName": "", "DestinationFolderPath": "/var/opt/mssql/data", // backing up db in linux machine "BackupFileNamePrefix": "" // Backup file name = $"{BackupFileNamePrefix}{ddmmyyyy_hhMMss}.bak" } ], "GoogleDriveUploaders": [ // uploading file to google drive named: $"{FileZipNamePrefix}{ddmmyyyy_hhMMss}.zip" { "Enabled": true, "OAuth_Client_Secret": "GooleDriveClientSecret\OAuth_client_secret.json", // OAuth client secret getting in Google Cloud "FolderId": "", // FolderId of Google Drive "FileZipNamePrefix": "", "FileInforItems": [ // list files which want to zip { "Enabled": true, "FolderPath": "", "FilePrefix": "" // Backup file name = $"{BackupFileNamePrefix}_{ddmmyyyy_hhMMss}.bak" } ], "KeepFileInDays": 7 // Only keep files for 7 days } ] } }
- Register Hosted Service:
WebHost.CreateDefaultBuilder(args) .ConfigureDGLGoogleDriveSqlServerHostedService() .UseStartup<Startup>() .UseSerilog() .Build();
- Add DI:
services.ConfigureDGLGoogleDriveSqlserverDatabaseBackup(Configuration)
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. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- Google.Apis.Drive.v3 (>= 1.61.0.3120)
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.2.0)
- Microsoft.Extensions.Options (>= 3.1.2)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 3.1.0)
- System.Data.SqlClient (>= 4.8.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.