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

Copy-DbaDatabase fails - Get-DbaBackupHistory finds Differential backup despite -CopyOnly #4526

Closed
4 tasks done
sqlslinger-zz opened this issue Nov 14, 2018 · 15 comments
Closed
4 tasks done
Assignees

Comments

@sqlslinger-zz
Copy link

Before submitting a bug report:

  • Ensure you are able to reproduce it on the latest released version (we release often)
  • Verified this bug is not already reported in an issue
  • Verified errors are not related to permissions
  • Can reproduce in a clean PowerShell session (clean = powershell -NoProfile)

Steps to Reproduce

/*
    Any T-SQL commands involved or used to produce test objects/data.
*/
<#
Copy-DbaDatabase -Source mySourceServer -Destination myDestServer -BackupRestore -NetworkShare \\myDestServer\backup -AllDatabases -ExcludeDatabase master,msdb,model,tempdb -ReuseSourceFolderStructure -verbose -force
#>

Copy-DbaDatabase -Source mySourceServer -Destination myDestServer -BackupRestore -NetworkShare \myDestServer\backup -AllDatabases -ExcludeDatabase master,msdb,model,tempdb -ReuseSourceFolderStructure -verbose -force

Expected Behavior

Type Name Status Notes


Database WTMaps Successful
Database WTMapsDEV Successful
Database WTMapsProductionCopy Successful

PLEASE NOTE:
In the Verbose Output below, at 16:25:42, on the failed (first) database, there is this line:
VERBOSE: [16:25:42][Get-DbaBackupHistory] Valid Differential backup

At 16:25:46, on the second successful database, there is this line (and similar for the third successful database):
VERBOSE: [16:25:46][Get-DbaBackupHistory] No Diff found

In actual fact all three of the databases have DIFF backups, but of course this should not matter nor should it be considered since Copy-DbaDatabase is making CopyOnly backups.

This same error happens on Start-DbaMigration, and whether -ReuseSourceFileStructure is used or not (though without that parm the Notes column says ("Failed to restore database").

The databases all share the same simple structure - D:\Data for data files, F::Logs for log files, and that is the default database file locations on the target server.

Actual Behavior

PS C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\dbatools> Copy-DbaDatabase -Source ussql007 -Destination ussqllab120 -BackupRestore -NetworkShare \ussqllab120\backup -AllDatabases -ExcludeDatabase master,msdb,model,tempdb -ReuseSourceFolderStructure -verbose -forc
e
VERBOSE: [16:25:38][Copy-DbaDatabase] Connecting to ussql007
VERBOSE: [16:25:38][Copy-DbaDatabase] Ensuring user databases exist (counting databases).
VERBOSE: [16:25:38][Copy-DbaDatabase] Connecting to ussqllab120
VERBOSE: [16:25:38][Test-DbaSqlPath] Connecting to USSQL007.
VERBOSE: [16:25:38][Test-DbaSqlPath] Connecting to USSQLLAB120.
VERBOSE: [16:25:38][Copy-DbaDatabase] Performing SMO version check.
VERBOSE: [16:25:38][Copy-DbaDatabase] Checking to ensure the source isn't the same as the destination.
VERBOSE: [16:25:38][Copy-DbaDatabase] Checking to ensure network path is valid.
VERBOSE: [16:25:38][Copy-DbaDatabase] \ussqllab120\backup share can be accessed.
VERBOSE: [16:25:38][Copy-DbaDatabase] Checking to ensure server is not SQL Server 7 or below.
VERBOSE: [16:25:38][Copy-DbaDatabase] Checking to ensure detach/attach is not attempted on SQL Server 2000.
VERBOSE: [16:25:38][Copy-DbaDatabase] Checking to ensure SQL Server 2000 migration isn't directly attempted to SQL Server 2012.
VERBOSE: [16:25:38][Copy-DbaDatabase] Warning if migration from 2005 to 2012 and above and attach/detach is used.
VERBOSE: [16:25:38][Copy-DbaDatabase] Warning on different collation.
VERBOSE: [16:25:38][Copy-DbaDatabase] Collation on ussql007, SQL_Latin1_General_CP1_CI_AI differs from the ussqllab120, Latin1_General_CI_AI.
VERBOSE: [16:25:38][Copy-DbaDatabase] Ensuring destination server version is equal to or greater than source.
VERBOSE: [16:25:38][Copy-DbaDatabase] Writing warning about filestream being enabled.
VERBOSE: [16:25:38][Copy-DbaDatabase] FILESTREAM enabled on ussql007 but not ussqllab120. Databases that use FILESTREAM will be skipped.
VERBOSE: [16:25:38][Copy-DbaDatabase] Building database list.
VERBOSE: [16:25:38][Copy-DbaDatabase] Performing count.
VERBOSE: [16:25:38][Copy-DbaDatabase] Building file structure inventory for 3 databases.
VERBOSE: [16:25:39][Get-SqlFileStructure] WTMaps
VERBOSE: [16:25:39][Get-SqlFileStructure] WTMapsDEV
VERBOSE: [16:25:39][Get-SqlFileStructure] WTMapsProductionCopy
VERBOSE: [16:25:39][Copy-DbaDatabase]
######### Database: WTMaps #########
VERBOSE: [16:25:39][Copy-DbaDatabase] Checking for accessibility.
VERBOSE: [16:25:39][Test-DbaSqlPath] Connecting to USSQLLAB120.
VERBOSE: [16:25:39][Copy-DbaDatabase] Checking Availability Group status.
VERBOSE: [16:25:39][Copy-DbaDatabase] Started: 11/14/2018 16:25:39.
VERBOSE: Performing the operation "Backup WTMaps from ussql007 and restoring" on target "ussqllab120".
VERBOSE: [16:25:39][Backup-DbaDatabase] Connecting to USSQL007
VERBOSE: [16:25:39][Backup-DbaDatabase] 1 database to backup
VERBOSE: [16:25:39][Backup-DbaDatabase] Backup database [WTMaps]
VERBOSE: [16:25:39][Backup-DbaDatabase] Creating full backup
VERBOSE: [16:25:39][Backup-DbaDatabase] Building file name
VERBOSE: [16:25:39][Backup-DbaDatabase] Setting filename
VERBOSE: [16:25:39][Backup-DbaDatabase] Building backup path
VERBOSE: [16:25:39][Test-DbaSqlPath] Connecting to USSQL007.
VERBOSE: [16:25:39][Backup-DbaDatabase] Devices added
VERBOSE: [16:25:42][Get-DbaBackupHistory] Connecting to USSQL007.
VERBOSE: [16:25:42][Get-DbaBackupHistory] Connecting to USSQL007.
VERBOSE: [16:25:42][Get-DbaBackupHistory] Processing WTMaps
VERBOSE: [16:25:42][Get-DbaBackupHistory] Executing sql query.
VERBOSE: [16:25:42][Get-DbaBackupHistory] Processing as grouped output.
VERBOSE: [16:25:42][Get-DbaBackupHistory] 2 result-groups found.
VERBOSE: [16:25:42][Get-DbaBackupHistory] Connecting to USSQL007.
VERBOSE: [16:25:42][Get-DbaBackupHistory] Processing WTMaps
VERBOSE: [16:25:42][Get-DbaBackupHistory] Executing sql query.
VERBOSE: [16:25:42][Get-DbaBackupHistory] Processing as grouped output.
VERBOSE: [16:25:42][Get-DbaBackupHistory] 2 result-groups found.
VERBOSE: [16:25:42][Get-DbaBackupHistory] Valid Differential backup
VERBOSE: [16:25:42][Get-DbaBackupHistory] Connecting to USSQL007.
VERBOSE: [16:25:42][Get-DbaBackupHistory] Executing sql query.
VERBOSE: [16:25:42][Get-DbaBackupHistory] Processing as grouped output.
VERBOSE: [16:25:42][Get-DbaBackupHistory] 3 result-groups found.
VERBOSE: [16:25:42][Copy-DbaDatabase] Reuse = True.
VERBOSE: [16:25:42][Restore-DbaDatabase] Changing statement timeout to infinity
VERBOSE: [16:25:42][Restore-DbaDatabase] ParameterSet = Restore
VERBOSE: [16:25:42][Restore-DbaDatabase] Trust Database Backup History Set
VERBOSE: [16:25:42][Restore-DbaDatabase] Processing DatabaseName - WTMaps
VERBOSE: [16:25:42][Select-DbaBackupInformation] Processing Db WTMaps
WARNING: [16:25:42][Copy-DbaDatabase] Failure attempting to restore WTMaps to ussqllab120
VERBOSE: [16:25:42][Copy-DbaDatabase] Failed to restore WTMaps to ussqllab120. You specified -ReuseSourceFolderStructure. Does the exact same destination directory structure exist?
VERBOSE: [16:25:42][Copy-DbaDatabase] Aborting routine for this database.

VERBOSE: [16:25:42][Copy-DbaDatabase]
######### Database: WTMapsDEV #########
VERBOSE: [16:25:42][Copy-DbaDatabase] Checking for accessibility.
VERBOSE: [16:25:42][Test-DbaSqlPath] Connecting to USSQLLAB120.
VERBOSE: [16:25:42][Copy-DbaDatabase] Checking Availability Group status.
VERBOSE: Performing the operation "DROP DATABASE WTMapsDEV" on target "ussqllab120".
VERBOSE: [16:25:42][Copy-DbaDatabase] WTMapsDEV already exists. -Force was specified. Dropping WTMapsDEV on ussqllab120.
VERBOSE: [16:25:42][Remove-DbaDatabase] Connecting to USSQLLAB120
VERBOSE: [16:25:43][Copy-DbaDatabase] Started: 11/14/2018 16:25:42.
VERBOSE: Performing the operation "Backup WTMapsDEV from ussql007 and restoring" on target "ussqllab120".
VERBOSE: [16:25:43][Backup-DbaDatabase] Connecting to USSQL007
VERBOSE: [16:25:43][Backup-DbaDatabase] 1 database to backup
VERBOSE: [16:25:43][Backup-DbaDatabase] Backup database [WTMapsDEV]
VERBOSE: [16:25:43][Backup-DbaDatabase] Creating full backup
VERBOSE: [16:25:43][Backup-DbaDatabase] Building file name
VERBOSE: [16:25:43][Backup-DbaDatabase] Setting filename
VERBOSE: [16:25:43][Backup-DbaDatabase] Building backup path
VERBOSE: [16:25:43][Test-DbaSqlPath] Connecting to USSQL007.
VERBOSE: [16:25:43][Backup-DbaDatabase] Devices added
VERBOSE: [16:25:46][Get-DbaBackupHistory] Connecting to USSQL007.
VERBOSE: [16:25:46][Get-DbaBackupHistory] Connecting to USSQL007.
VERBOSE: [16:25:46][Get-DbaBackupHistory] Processing WTMapsDEV
VERBOSE: [16:25:46][Get-DbaBackupHistory] Executing sql query.
VERBOSE: [16:25:46][Get-DbaBackupHistory] Processing as grouped output.
VERBOSE: [16:25:46][Get-DbaBackupHistory] 3 result-groups found.
VERBOSE: [16:25:46][Get-DbaBackupHistory] Connecting to USSQL007.
VERBOSE: [16:25:46][Get-DbaBackupHistory] Processing WTMapsDEV
VERBOSE: [16:25:46][Get-DbaBackupHistory] Executing sql query.
VERBOSE: [16:25:46][Get-DbaBackupHistory] Processing as grouped output.
VERBOSE: [16:25:46][Get-DbaBackupHistory] 2 result-groups found.
VERBOSE: [16:25:46][Get-DbaBackupHistory] No Diff found
VERBOSE: [16:25:46][Get-DbaBackupHistory] Connecting to USSQL007.
VERBOSE: [16:25:46][Get-DbaBackupHistory] Executing sql query.
VERBOSE: [16:25:46][Get-DbaBackupHistory] Processing as grouped output.
VERBOSE: [16:25:46][Get-DbaBackupHistory] 3 result-groups found.
VERBOSE: [16:25:46][Copy-DbaDatabase] Reuse = True.
VERBOSE: [16:25:46][Restore-DbaDatabase] Changing statement timeout to infinity
VERBOSE: [16:25:46][Restore-DbaDatabase] ParameterSet = Restore
VERBOSE: [16:25:46][Restore-DbaDatabase] Trust Database Backup History Set
VERBOSE: [16:25:46][Restore-DbaDatabase] Processing DatabaseName - WTMapsDEV
VERBOSE: [16:25:46][Select-DbaBackupInformation] Processing Db WTMapsDEV
VERBOSE: [16:25:46][Select-DbaBackupInformation] Setting LogBaseLSN
VERBOSE: [16:25:46][Format-DbaBackupInformation] Starting
VERBOSE: [16:25:46][Format-DbaBackupInformation] String passed in for DB rename
VERBOSE: [16:25:46][Format-DbaBackupInformation] New DbName (String) = WTMapsDEV
VERBOSE: [16:25:46][Format-DbaBackupInformation] 1 PhysicalName = D:\Data\WTMapsDEV_Data.MDF
VERBOSE: [16:25:46][Format-DbaBackupInformation] PhysicalName = D:\Data\WTMapsDEV_Data.MDF
VERBOSE: [16:25:46][Format-DbaBackupInformation] 1 PhysicalName = F:\Logs\WTMapsDEV_Log.LDF
VERBOSE: [16:25:46][Format-DbaBackupInformation] PhysicalName = F:\Logs\WTMapsDEV_Log.LDF
VERBOSE: [16:25:46][Restore-DbaDatabase] VerifyOnly = False
VERBOSE: [16:25:46][Get-DbaDbPhysicalFile] Connecting to USSQLLAB120
VERBOSE: [16:25:46][Test-DbaBackupInformation] Testing restore for WTMapsDEV
VERBOSE: [16:25:46][Get-DbaDatabase] Connecting to USSQLLAB120.
VERBOSE: [16:25:46][Test-DbaBackupInformation] VerifyOnly = False
VERBOSE: [16:25:46][Test-DbaSqlPath] Connecting to USSQLLAB120.
VERBOSE: [16:25:46][Test-DbaSqlPath] Connecting to USSQLLAB120.
VERBOSE: [16:25:46][Test-DbaSqlPath] Connecting to USSQLLAB120.
VERBOSE: [16:25:46][Test-DbaSqlPath] Connecting to USSQLLAB120.
VERBOSE: [16:25:46][Test-DbaLsnChain] Testing LSN Chain
VERBOSE: [16:25:46][Test-DbaLsnChain] Testing LSN Chain - Type Type
VERBOSE: [16:25:46][Test-DbaLsnChain] Passed LSN Chain checks
VERBOSE: [16:25:46][Test-DbaBackupInformation] Marking WTMapsDEV as verified
VERBOSE: [16:25:46][Restore-DbaDatabase] WTMapsDEV passed testing
VERBOSE: [16:25:46][Restore-DbaDatabase] Passing in to restore
VERBOSE: [16:25:46][Invoke-DbaAdvancedRestore] Performing restore action
VERBOSE: [16:25:56][Invoke-DbaAdvancedRestore] Succeeded, Closing Server connection
VERBOSE: [16:25:56][Copy-DbaDatabase] Successfully restored WTMapsDEV to ussqllab120.
VERBOSE: [16:25:56][Copy-DbaDatabase] Deleting \ussqllab120\backup\WTMapsDEV_201811141625-1-of-3.bak.
VERBOSE: [16:25:56][Copy-DbaDatabase] Deleting \ussqllab120\backup\WTMapsDEV_201811141625-2-of-3.bak.
VERBOSE: [16:25:56][Copy-DbaDatabase] Deleting \ussqllab120\backup\WTMapsDEV_201811141625-3-of-3.bak.
VERBOSE: [16:25:56][Copy-DbaDatabase] Updating database owner to sa.
VERBOSE: [16:25:56][Set-DbaDatabaseOwner] Connecting to USSQLLAB120.
VERBOSE: [16:25:56][Set-DbaDatabaseOwner] Updating 1 database(s).
VERBOSE: [16:25:56][Set-DbaDatabaseOwner] Setting database owner for WTMapsDEV to sa on USSQLLAB120.
VERBOSE: Performing the operation "Updating Trustworthy on WTMapsDEV" on target "ussqllab120".
VERBOSE: [16:25:56][Copy-DbaDatabase] Successfully updated Trustworthy to True for WTMapsDEV on ussqllab120
VERBOSE: [16:25:56][Copy-DbaDatabase] Finished: 11/14/2018 16:25:56.
VERBOSE: [16:25:56][Copy-DbaDatabase] Elapsed time: 00:00:13.
VERBOSE: [16:25:56][Copy-DbaDatabase]
######### Database: WTMapsProductionCopy #########
VERBOSE: [16:25:56][Copy-DbaDatabase] Checking for accessibility.
VERBOSE: [16:25:56][Test-DbaSqlPath] Connecting to USSQLLAB120.
VERBOSE: [16:25:56][Copy-DbaDatabase] Checking Availability Group status.
VERBOSE: Performing the operation "DROP DATABASE WTMapsProductionCopy" on target "ussqllab120".
VERBOSE: [16:25:56][Copy-DbaDatabase] WTMapsProductionCopy already exists. -Force was specified. Dropping WTMapsProductionCopy on ussqllab120.
VERBOSE: [16:25:56][Remove-DbaDatabase] Connecting to USSQLLAB120
VERBOSE: [16:25:56][Copy-DbaDatabase] Started: 11/14/2018 16:25:56.
VERBOSE: Performing the operation "Backup WTMapsProductionCopy from ussql007 and restoring" on target "ussqllab120".
VERBOSE: [16:25:56][Backup-DbaDatabase] Connecting to USSQL007
VERBOSE: [16:25:56][Backup-DbaDatabase] 1 database to backup
VERBOSE: [16:25:56][Backup-DbaDatabase] Backup database [WTMapsProductionCopy]
VERBOSE: [16:25:56][Backup-DbaDatabase] Creating full backup
VERBOSE: [16:25:56][Backup-DbaDatabase] Building file name
VERBOSE: [16:25:56][Backup-DbaDatabase] Setting filename
VERBOSE: [16:25:56][Backup-DbaDatabase] Building backup path
VERBOSE: [16:25:56][Test-DbaSqlPath] Connecting to USSQL007.
VERBOSE: [16:25:56][Backup-DbaDatabase] Devices added
VERBOSE: [16:25:59][Get-DbaBackupHistory] Connecting to USSQL007.
VERBOSE: [16:25:59][Get-DbaBackupHistory] Connecting to USSQL007.
VERBOSE: [16:25:59][Get-DbaBackupHistory] Processing WTMapsProductionCopy
VERBOSE: [16:25:59][Get-DbaBackupHistory] Executing sql query.
VERBOSE: [16:25:59][Get-DbaBackupHistory] Processing as grouped output.
VERBOSE: [16:25:59][Get-DbaBackupHistory] 3 result-groups found.
VERBOSE: [16:25:59][Get-DbaBackupHistory] Connecting to USSQL007.
VERBOSE: [16:25:59][Get-DbaBackupHistory] Processing WTMapsProductionCopy
VERBOSE: [16:25:59][Get-DbaBackupHistory] Executing sql query.
VERBOSE: [16:25:59][Get-DbaBackupHistory] Processing as grouped output.
VERBOSE: [16:25:59][Get-DbaBackupHistory] 2 result-groups found.
VERBOSE: [16:25:59][Get-DbaBackupHistory] No Diff found
VERBOSE: [16:25:59][Get-DbaBackupHistory] Connecting to USSQL007.
VERBOSE: [16:25:59][Get-DbaBackupHistory] Executing sql query.
VERBOSE: [16:26:00][Get-DbaBackupHistory] Processing as grouped output.
VERBOSE: [16:26:00][Get-DbaBackupHistory] 808 result-groups found.
VERBOSE: [16:26:02][Copy-DbaDatabase] Reuse = True.
VERBOSE: [16:26:02][Restore-DbaDatabase] Changing statement timeout to infinity
VERBOSE: [16:26:02][Restore-DbaDatabase] ParameterSet = Restore
VERBOSE: [16:26:02][Restore-DbaDatabase] Trust Database Backup History Set
VERBOSE: [16:26:02][Restore-DbaDatabase] Processing DatabaseName - WTMapsProductionCopy
VERBOSE: [16:26:02][Select-DbaBackupInformation] Processing Db WTMapsProductionCopy
VERBOSE: [16:26:02][Select-DbaBackupInformation] Setting LogBaseLSN
VERBOSE: [16:26:02][Format-DbaBackupInformation] Starting
VERBOSE: [16:26:02][Format-DbaBackupInformation] String passed in for DB rename
VERBOSE: [16:26:02][Format-DbaBackupInformation] New DbName (String) = WTMapsProductionCopy
VERBOSE: [16:26:02][Format-DbaBackupInformation] 1 PhysicalName = D:\Data\WTMapsProductionCopy_Data.MDF
VERBOSE: [16:26:02][Format-DbaBackupInformation] PhysicalName = D:\Data\WTMapsProductionCopy_Data.MDF
VERBOSE: [16:26:02][Format-DbaBackupInformation] 1 PhysicalName = F:\Logs\WTMapsProductionCopy_Log.LDF
VERBOSE: [16:26:02][Format-DbaBackupInformation] PhysicalName = F:\Logs\WTMapsProductionCopy_Log.LDF
VERBOSE: [16:26:02][Restore-DbaDatabase] VerifyOnly = False
VERBOSE: [16:26:02][Get-DbaDbPhysicalFile] Connecting to USSQLLAB120
VERBOSE: [16:26:02][Test-DbaBackupInformation] Testing restore for WTMapsProductionCopy
VERBOSE: [16:26:02][Get-DbaDatabase] Connecting to USSQLLAB120.
VERBOSE: [16:26:02][Test-DbaBackupInformation] VerifyOnly = False
VERBOSE: [16:26:02][Test-DbaSqlPath] Connecting to USSQLLAB120.
VERBOSE: [16:26:02][Test-DbaSqlPath] Connecting to USSQLLAB120.
VERBOSE: [16:26:02][Test-DbaSqlPath] Connecting to USSQLLAB120.
VERBOSE: [16:26:02][Test-DbaSqlPath] Connecting to USSQLLAB120.
VERBOSE: [16:26:02][Test-DbaLsnChain] Testing LSN Chain
VERBOSE: [16:26:02][Test-DbaLsnChain] Testing LSN Chain - Type Type
VERBOSE: [16:26:02][Test-DbaLsnChain] Passed LSN Chain checks
VERBOSE: [16:26:02][Test-DbaBackupInformation] Marking WTMapsProductionCopy as verified
VERBOSE: [16:26:02][Restore-DbaDatabase] WTMapsProductionCopy passed testing
VERBOSE: [16:26:02][Restore-DbaDatabase] Passing in to restore
VERBOSE: [16:26:02][Invoke-DbaAdvancedRestore] Performing restore action
VERBOSE: [16:26:14][Invoke-DbaAdvancedRestore] Succeeded, Closing Server connection
VERBOSE: [16:26:14][Copy-DbaDatabase] Successfully restored WTMapsProductionCopy to ussqllab120.
VERBOSE: [16:26:14][Copy-DbaDatabase] Deleting \ussqllab120\backup\WTMapsProductionCopy_201811141625-1-of-3.bak.
VERBOSE: [16:26:14][Copy-DbaDatabase] Deleting \ussqllab120\backup\WTMapsProductionCopy_201811141625-2-of-3.bak.
VERBOSE: [16:26:14][Copy-DbaDatabase] Deleting \ussqllab120\backup\WTMapsProductionCopy_201811141625-3-of-3.bak.
VERBOSE: [16:26:14][Copy-DbaDatabase] Updating database owner to sa.
VERBOSE: [16:26:14][Set-DbaDatabaseOwner] Connecting to USSQLLAB120.
VERBOSE: [16:26:14][Set-DbaDatabaseOwner] Updating 1 database(s).
VERBOSE: [16:26:14][Set-DbaDatabaseOwner] Setting database owner for WTMapsProductionCopy to sa on USSQLLAB120.
VERBOSE: Performing the operation "Updating Trustworthy on WTMapsProductionCopy" on target "ussqllab120".
VERBOSE: [16:26:14][Copy-DbaDatabase] Successfully updated Trustworthy to True for WTMapsProductionCopy on ussqllab120
VERBOSE: [16:26:14][Copy-DbaDatabase] Finished: 11/14/2018 16:26:14.
VERBOSE: [16:26:14][Copy-DbaDatabase] Elapsed time: 00:00:17.
Type Name Status Notes


Database WTMaps Failed Failed to restore. ReuseSourceFolderStructure was specified, verify same directory structure exist on destination.
Database WTMapsDEV Successful
Database WTMapsProductionCopy Successful

PS C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\dbatools>

Environmental data

  • PowerShell:
    PS C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\dbatools> $Psversiontable

Name Value


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

PS C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\dbatools>

    • SQL Server:
      SourceServer:
      Microsoft SQL Server 2014 (SP2-CU3) (KB3204388) - 12.0.5538.0 (X64)
      Dec 15 2016 17:52:48
      Copyright (c) Microsoft Corporation
      Standard Edition (64-bit) on Windows NT 6.3 (Build 9600: ) (Hypervisor)

TargetServer:
Microsoft SQL Server 2017 (RTM) - 14.0.1000.169 (X64)
Aug 22 2017 17:04:49
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: ) (Hypervisor)

@potatoqualitee
Copy link
Member

Thank you for the report. @Stuart-Moore - I could set it to ignore diffs in the wrapper commands but want to make sure there's not an underlying issue.

@sqlslinger-zz sqlslinger-zz changed the title Copy-DbaDatabase fails - Get-DbaBackupHistory finds Differential backup despite -NoCopyOnly Copy-DbaDatabase fails - Get-DbaBackupHistory finds Differential backup despite -CopyOnly Nov 16, 2018
@Stuart-Moore
Copy link
Contributor

$CopyOnly wasn't being passed through in the internal call in Get-DbaBackupHistory. It is now.

Fixed in PR #4675

@potatoqualitee
Copy link
Member

:bananadance: thank you 💯 !

@sqlslinger-zz
Copy link
Author

Thanks for updating this. Has this been released to development zip file or master zip? I've downloaded both and still have the problem...

@sqlslinger-zz
Copy link
Author

Version 0.9.533

@sqlslinger-zz
Copy link
Author

sqlslinger-zz commented Nov 28, 2018 via email

@sqlslinger-zz
Copy link
Author

sqlslinger-zz commented Nov 28, 2018 via email

@Stuart-Moore
Copy link
Contributor

Or we could make sure that the current recoveryforkGUID is being passed back into the history function.

PR imminent

@Stuart-Moore Stuart-Moore reopened this Nov 29, 2018
@sqlslinger-zz
Copy link
Author

sqlslinger-zz commented Nov 29, 2018 via email

@Stuart-Moore
Copy link
Contributor

Nope, we've already got the recoveryForkguid so we'll just pass that back in.

If you're doing a restore at the same time as the copy then you'll break it, but you'll it a lot more than just that ;)

@sqlslinger-zz
Copy link
Author

sqlslinger-zz commented Nov 30, 2018 via email

@sqlslinger-zz
Copy link
Author

Stuart, any update on this bug?

@Stuart-Moore
Copy link
Contributor

Sorry, it actually got pushed in a while ago. Can you try with a recent copy of master (or dev branch) please

@potatoqualitee
Copy link
Member

will close unless it's not fixed, please let us know @sqlslinger and thank you for fixing, @Stuart-Moore !

@Stuart-Moore
Copy link
Contributor

Stuart-Moore commented Jan 1, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants