Skip to content
Permalink
Browse files

1.0.82

  • Loading branch information
potatoqualitee committed Jan 10, 2020
1 parent c5de5ae commit 01bf8fc72a16c5a797639b6e16762c151fc7cb25
Showing with 22 additions and 8 deletions.
  1. +8 −2 allcommands.ps1
  2. +9 −1 bin/dbatools-index.json
  3. +1 −1 dbatools.psd1
  4. +4 −4 en-us/dbatools-help.xml
@@ -1080,6 +1080,7 @@ function Backup-DbaDatabase {
[string[]]$Path,
[Alias('BackupFileName')]
[string]$FilePath,
[switch]$IncrementPrefix,
[switch]$ReplaceInName,
[switch]$CopyOnly,
[ValidateSet('Full', 'Log', 'Differential', 'Diff', 'Database')]
@@ -1257,6 +1258,10 @@ function Backup-DbaDatabase {
$InputObject = $InputObject | Where-Object Name -notin $ExcludeDatabase
}

if ($InputObject.count -eq 0) {
Write-Message -Level Warning -Message "No databases match the request for backups"
}

foreach ($db in $InputObject) {
$ProgressId = Get-Random
$failures = @()
@@ -1399,10 +1404,11 @@ function Backup-DbaDatabase {
} else {
$slash = "\"
}

if ($FinalBackupPath.Count -gt 1) {
$File = New-Object System.IO.FileInfo($BackupFinalName)
for ($i = 0; $i -lt $FinalBackupPath.Count; $i++) {
$FinalBackupPath[$i] = $FinalBackupPath[$i] + $slash + $($File.BaseName) + "-$($i+1)-of-$FileCount.$suffix"
$FinalBackupPath[$i] = $FinalBackupPath[$i] + $slash + ("$($i+1)-" * $IncrementPrefix.ToBool() ) + $($File.BaseName) + "-$($i+1)-of-$FileCount.$suffix"
}
} elseif ($FinalBackupPath[0] -ne 'NUL:') {
$FinalBackupPath[0] = $FinalBackupPath[0] + $slash + $BackupFinalName
@@ -16959,7 +16965,7 @@ function Find-DbaLoginInGroup {
$group = [System.DirectoryServices.AccountManagement.GroupPrincipal]::FindByIdentity($ads, $groupName);
$subgroups = @()
foreach ($member in $group.Members) {
$memberDomain = $ads.Name
$memberDomain = $member.Context.Name
if ($member.StructuralObjectClass -eq 'group') {
$fullName = $memberDomain + "\" + $member.SamAccountName
if ($fullName -in $discard) {
@@ -1187,6 +1187,14 @@
"false",
""
],
[
"IncrementPrefix",
"If enables, this will prefix backup files with an incrementing integer (ie; \u00271-\u0027, \u00272-\u0027). Using this has been alleged to improved restore times on some Azure based SQL Database platorms",
"",
false,
"false",
"False"
],
[
"ReplaceInName",
"If this switch is set, the following list of strings will be replaced in the FilePath and Path strings:\r\n instancename - will be replaced with the instance Name\r\n servername - will be replaced with the server name\r\n dbname - will be replaced with the database name\r\n timestamp - will be replaced with the timestamp (either the default, or the format provided)\r\n backuptype - will be replaced with Full, Log or Differential as appropriate",
@@ -1404,7 +1412,7 @@
""
]
],
"Syntax": "Backup-DbaDatabase [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-Path \u003cString[]\u003e] [-FilePath \u003cString\u003e] [-ReplaceInName] [-CopyOnly] [-Type \u003cString\u003e] [-CreateFolder] [-FileCount \u003cInt32\u003e] [-CompressBackup] [-Checksum] [-Verify] [-MaxTransferSize \u003cInt32\u003e] [-BlockSize \u003cInt32\u003e] [-BufferCount \u003cInt32\u003e] [-AzureBaseUrl \u003cString[]\u003e] [-AzureCredential \u003cString\u003e] [-NoRecovery] [-BuildPath] [-WithFormat] [-Initialize] [-SkipTapeHeader] [-TimeStampFormat \u003cString\u003e] [-IgnoreFileChecks] [-OutputScriptOnly] [-EncryptionAlgorithm \u003cString\u003e] [-EncryptionCertificate \u003cString\u003e] \r\n[-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nBackup-DbaDatabase -SqlInstance \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-Path \u003cString[]\u003e] [-FilePath \u003cString\u003e] [-ReplaceInName] [-CopyOnly] [-Type \u003cString\u003e] [-CreateFolder] [-FileCount \u003cInt32\u003e] [-CompressBackup] [-Checksum] [-Verify] [-MaxTransferSize \u003cInt32\u003e] [-BlockSize \u003cInt32\u003e] [-BufferCount \u003cInt32\u003e] [-AzureBaseUrl \u003cString[]\u003e] [-AzureCredential \u003cString\u003e] [-NoRecovery] [-BuildPath] [-WithFormat] [-Initialize] [-SkipTapeHeader] [-TimeStampFormat \u003cString\u003e] [-IgnoreFileChecks] [-OutputScriptOnly] [-EncryptionAlgorithm \r\n\u003cString\u003e] [-EncryptionCertificate \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nBackup-DbaDatabase [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-Path \u003cString[]\u003e] [-FilePath \u003cString\u003e] [-ReplaceInName] [-CopyOnly] [-Type \u003cString\u003e] -InputObject \u003cObject[]\u003e [-CreateFolder] [-FileCount \u003cInt32\u003e] [-CompressBackup] [-Checksum] [-Verify] [-MaxTransferSize \u003cInt32\u003e] [-BlockSize \u003cInt32\u003e] [-BufferCount \u003cInt32\u003e] [-AzureBaseUrl \u003cString[]\u003e] [-AzureCredential \u003cString\u003e] [-NoRecovery] [-BuildPath] [-WithFormat] [-Initialize] [-SkipTapeHeader] [-TimeStampFormat \u003cString\u003e] [-IgnoreFileChecks] [-OutputScriptOnly] [-EncryptionAlgorithm \u003cString\u003e] \r\n[-EncryptionCertificate \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
"Syntax": "Backup-DbaDatabase [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-Path \u003cString[]\u003e] [-FilePath \u003cString\u003e] [-IncrementPrefix] [-ReplaceInName] [-CopyOnly] [-Type \u003cString\u003e] [-CreateFolder] [-FileCount \u003cInt32\u003e] [-CompressBackup] [-Checksum] [-Verify] [-MaxTransferSize \u003cInt32\u003e] [-BlockSize \u003cInt32\u003e] [-BufferCount \u003cInt32\u003e] [-AzureBaseUrl \u003cString[]\u003e] [-AzureCredential \u003cString\u003e] [-NoRecovery] [-BuildPath] [-WithFormat] [-Initialize] [-SkipTapeHeader] [-TimeStampFormat \u003cString\u003e] [-IgnoreFileChecks] [-OutputScriptOnly] [-EncryptionAlgorithm \u003cString\u003e] \r\n[-EncryptionCertificate \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nBackup-DbaDatabase -SqlInstance \u003cDbaInstanceParameter\u003e [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-Path \u003cString[]\u003e] [-FilePath \u003cString\u003e] [-IncrementPrefix] [-ReplaceInName] [-CopyOnly] [-Type \u003cString\u003e] [-CreateFolder] [-FileCount \u003cInt32\u003e] [-CompressBackup] [-Checksum] [-Verify] [-MaxTransferSize \u003cInt32\u003e] [-BlockSize \u003cInt32\u003e] [-BufferCount \u003cInt32\u003e] [-AzureBaseUrl \u003cString[]\u003e] [-AzureCredential \u003cString\u003e] [-NoRecovery] [-BuildPath] [-WithFormat] [-Initialize] [-SkipTapeHeader] [-TimeStampFormat \u003cString\u003e] [-IgnoreFileChecks] [-OutputScriptOnly] \r\n[-EncryptionAlgorithm \u003cString\u003e] [-EncryptionCertificate \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]\nBackup-DbaDatabase [-SqlCredential \u003cPSCredential\u003e] [-Database \u003cObject[]\u003e] [-ExcludeDatabase \u003cObject[]\u003e] [-Path \u003cString[]\u003e] [-FilePath \u003cString\u003e] [-IncrementPrefix] [-ReplaceInName] [-CopyOnly] [-Type \u003cString\u003e] -InputObject \u003cObject[]\u003e [-CreateFolder] [-FileCount \u003cInt32\u003e] [-CompressBackup] [-Checksum] [-Verify] [-MaxTransferSize \u003cInt32\u003e] [-BlockSize \u003cInt32\u003e] [-BufferCount \u003cInt32\u003e] [-AzureBaseUrl \u003cString[]\u003e] [-AzureCredential \u003cString\u003e] [-NoRecovery] [-BuildPath] [-WithFormat] [-Initialize] [-SkipTapeHeader] [-TimeStampFormat \u003cString\u003e] [-IgnoreFileChecks] [-OutputScriptOnly] [-EncryptionAlgorithm \r\n\u003cString\u003e] [-EncryptionCertificate \u003cString\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
},
{
"Name": "Backup-DbaDbCertificate",
@@ -11,7 +11,7 @@
RootModule = 'dbatools.psm1'

# Version number of this module.
ModuleVersion = '1.0.81'
ModuleVersion = '1.0.82'

# ID used to uniquely identify this module
GUID = '9d139310-ce45-41ce-8e8b-d76335aa1789'

0 comments on commit 01bf8fc

Please sign in to comment.
You can’t perform that action at this time.