Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-DbaDbLogShipping -CompressBackup doesn't work #8155

Closed
Read20 opened this issue Feb 7, 2022 · 1 comment · Fixed by #8156
Closed

Invoke-DbaDbLogShipping -CompressBackup doesn't work #8155

Read20 opened this issue Feb 7, 2022 · 1 comment · Fixed by #8156
Labels
bugs life confirmed Label to be used by maintainers that confirm a bug does exist for the given issue

Comments

@Read20
Copy link

Read20 commented Feb 7, 2022

Verified issue does not already exist?

Yes

What error did you receive?

There is no error that occurs. When using Invoke-DbaDbLogShipping and setting the -CompressBackup parameter to true, it doesn't actually apply the setting. Below is the verbose output. You can see the compress backup setting is being set to 1 but the SQL query that is executed doesn't include "@backup_compression = 1" in it.

VERBOSE: [12:20:46][Invoke-DbaDbLogShipping] Configuring logshipping for primary database
VERBOSE: [12:20:46][New-DbaLogShippingPrimaryDatabase] Setting backup compression to 1.
VERBOSE: [12:20:46][New-DbaLogShippingPrimaryDatabase] Setting Threshold alert to 0.
VERBOSE: [12:20:46][New-DbaLogShippingPrimaryDatabase] Configuring logshipping for primary database XXX.
VERBOSE: [12:20:46][New-DbaLogShippingPrimaryDatabase] Executing query:

    DECLARE @LS_BackupJobId AS uniqueidentifier;
    DECLARE @LS_PrimaryId AS uniqueidentifier;
    EXEC master.sys.sp_add_log_shipping_primary_database
        @database = N'XXX'
        ,@backup_directory = N'XXX'
        ,@backup_share = N'XXX'
        ,@backup_job_name = N'LSBackup_XXX'
        ,@backup_retention_period = 20160
        ,@backup_threshold = 60
        ,@history_retention_period = 14420
        ,@backup_job_id = @LS_BackupJobId OUTPUT
        ,@primary_id = @LS_PrimaryId OUTPUT 
        ,@overwrite = 1;

Steps to Reproduce

# provide your command(s) executed pertaining to dbatools
# please include variable values (redacted or fake if needed) for reference

#NOTE: What I put here for names and folder paths are not what I'm actually using. Sensitive information has been omitted.

$params = @{
SourceSqlInstance = 'PrimaryDbServer'
DestinationSqlInstance = 'SecondaryDbServer'
Database = 'DbName'
SharedPath= '\Path\To\Folder'
BackupRetention = 20160
BackupScheduleFrequencyType = 'daily'
BackupScheduleFrequencyInterval = 'EveryDay'
BackupScheduleFrequencySubdayType = 'Minutes'
BackupScheduleFrequencySubdayInterval = 5
CompressBackup = $true
CopyDestinationFolder = '\Path\To\Folder'
CopyRetention = 20160
CopyScheduleDisabled = $true
CopyScheduleFrequencyType = 'daily'
CopyScheduleFrequencyInterval = 'Everyday'
CopyScheduleFrequencySubdayType = 'Minutes'
CopyScheduleFrequencySubdayInterval = 15
FullBackupPath = '\Path\To\Full\Backup\File.bak'
GenerateFullBackup = $false
RestoreDataFolder = 'F:\SQL'
RestoreLogFolder = 'E:\SQL'
RestoreDelay = 120
RestoreRetention = 20160
RestoreScheduleFrequencyType = 'daily'
RestoreScheduleFrequencyInterval = 'Everyday'
RestoreScheduleFrequencySubdayType = 'Minutes'
RestoreScheduleFrequencySubdayInterval = 15
UseExistingFullBackup = $true
Force = $false
WhatIf = $false
}

Invoke-DbaDbLogShipping @params -Verbose

Are you running the latest release?

Yes

Other details or mentions

No response

What PowerShell host was used when producing this error

VS Code (integrated terminal)

PowerShell Host Version

Name Value


PSVersion 5.1.17763.2268
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.2268
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

SQL Server Edition and Build number

Microsoft SQL Server 2014 (SP3) (KB4022619) - 12.0.6024.0 (X64) Sep 7 2018 01:37:51 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.3 (Build 9600: )

.NET Framework Version

.NET Framework 4.8.4420.0

@andreasjordan
Copy link
Contributor

Thanks for reporting this - fix is on its way...

@andreasjordan andreasjordan added confirmed Label to be used by maintainers that confirm a bug does exist for the given issue and removed triage required New issue that has not been reviewed by maintainers labels Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs life confirmed Label to be used by maintainers that confirm a bug does exist for the given issue
Projects
None yet
2 participants