Add isCopyOnly to backup service (#397)

This commit is contained in:
Kate Shin
2017-06-28 12:53:40 -07:00
committed by GitHub
parent cdfdd7bd5a
commit 8f5b5b14ca
2 changed files with 7 additions and 1 deletions

View File

@@ -225,6 +225,8 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
}
}
this.backup.CopyOnly = this.backupInfo.IsCopyOnly;
//TODO: This should be changed to get user inputs
this.backup.FormatMedia = false;
this.backup.Initialize = false;
@@ -232,7 +234,7 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
this.backup.Checksum = false;
this.backup.ContinueAfterError = false;
this.backup.LogTruncation = BackupTruncateLogType.Truncate;
// Execute backup
this.backup.SqlBackup(this.dataContainer.Server);
}

View File

@@ -54,5 +54,9 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery.Contracts
/// </summary>
public List<string> BackupPathList { get; set; }
/// <summary>
/// Indicates if the backup should be copy-only
/// </summary>
public bool IsCopyOnly { get; set; }
}
}