mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 18:47:57 -05:00
Add isCopyOnly to backup service (#397)
This commit is contained in:
@@ -225,6 +225,8 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.backup.CopyOnly = this.backupInfo.IsCopyOnly;
|
||||||
|
|
||||||
//TODO: This should be changed to get user inputs
|
//TODO: This should be changed to get user inputs
|
||||||
this.backup.FormatMedia = false;
|
this.backup.FormatMedia = false;
|
||||||
this.backup.Initialize = false;
|
this.backup.Initialize = false;
|
||||||
@@ -232,7 +234,7 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
|
|||||||
this.backup.Checksum = false;
|
this.backup.Checksum = false;
|
||||||
this.backup.ContinueAfterError = false;
|
this.backup.ContinueAfterError = false;
|
||||||
this.backup.LogTruncation = BackupTruncateLogType.Truncate;
|
this.backup.LogTruncation = BackupTruncateLogType.Truncate;
|
||||||
|
|
||||||
// Execute backup
|
// Execute backup
|
||||||
this.backup.SqlBackup(this.dataContainer.Server);
|
this.backup.SqlBackup(this.dataContainer.Server);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,5 +54,9 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery.Contracts
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public List<string> BackupPathList { get; set; }
|
public List<string> BackupPathList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if the backup should be copy-only
|
||||||
|
/// </summary>
|
||||||
|
public bool IsCopyOnly { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user