mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-28 01:25:44 -05:00
Fix backup service to have multiple backup instances (#396)
* Allow multiple backups per backup service instance * Add test to run multiple backups * Update backup cancelTask method signature * Fix to have multiple backup instances and add more tests * Address PR comments * Remove double new lines * Add Azure check for backup operations
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
using Microsoft.SqlServer.Management.Smo;
|
||||
using Microsoft.SqlTools.ServiceLayer.Admin;
|
||||
using Microsoft.SqlTools.ServiceLayer.DisasterRecovery.Contracts;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for backup operations
|
||||
/// </summary>
|
||||
public interface IBackupOperation
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialize
|
||||
/// </summary>
|
||||
/// <param name="dataContainer"></param>
|
||||
/// <param name="sqlConnection"></param>
|
||||
void Initialize(CDataContainer dataContainer, SqlConnection sqlConnection);
|
||||
|
||||
/// <summary>
|
||||
/// Return database metadata for backup
|
||||
/// </summary>
|
||||
/// <param name="databaseName"></param>
|
||||
/// <returns></returns>
|
||||
BackupConfigInfo GetBackupConfigInfo(string databaseName);
|
||||
|
||||
/// <summary>
|
||||
/// Set backup input properties
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
void SetBackupInput(BackupInfo input);
|
||||
|
||||
/// <summary>
|
||||
/// Execute backup
|
||||
/// </summary>
|
||||
void PerformBackup();
|
||||
|
||||
/// <summary>
|
||||
/// Cancel backup
|
||||
/// </summary>
|
||||
void CancelBackup();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user