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

Get-DbaDbRestoreHistory - additional restore point info request #7854 #7855

Closed
wants to merge 1 commit into from
Closed

Get-DbaDbRestoreHistory - additional restore point info request #7854 #7855

wants to merge 1 commit into from

Conversation

devondba
Copy link
Contributor

Included BackupStartDate along with StopAt & a combination of the two to provide the LastRestorePoint - being either the stopat point or the start of the last restored backup

Type of Change

  • Bug fix (non-breaking change, fixes # )
  • [x ] New feature (non-breaking change, adds functionality, fixes Get-DbaDbRestoreHistory - additional restore point info request #7854 )
  • Breaking change (effects multiple commands or functionality, fixes # )
  • Ran manual Pester test and has passed (.\tests\manual.pester.ps1)
  • Adding code coverage to existing functionality
  • Pester test is included
  • If new file reference added for test, has is been added to github.com/sqlcollaborative/appveyor-lab ?
  • Unit test is included
  • Documentation
  • Build system

Purpose

Adds additional information to the output of the function relating to the point in time of the restore.

Approach

Additional fields returned in SQL statement

Commands to test

Same as before just provide additional lines of output

Screenshots

Shows the new output and the LastRestorePoint being the start of the differential backup.

image

This shows the output of the SQL queries used in the script. Demonstrating the LastRestorePoint returned as the stop_at point:

image

The following shows the output with the last file being a transaction log created after the stop at point but covering the required time. The LastRestoredPoint is shown as the stop at point not the .trn file datetime (UTC, rather than BST)

image

Finally the log backup not being after the stop at time therefore the stop at time can't be used and the point in time will be that of the backup file.

image

Included BackupStartDate along with StopAt & a combination of the two to provide the LastRestorePoint - being either the stopat point or the start of the last restored backup
@potatoqualitee
Copy link
Member

Thank you for the PR! Unfortunately, a lot of our tests have failed. If you continue to have problems, we can ping Stuart to see what's up.

@devondba
Copy link
Contributor Author

Thanks Chrissy, I'll go through the errors and fix what I can then see how it goes. I'll ping Stuart if needs be but I'll get what I can sorted, thanks again.

@devondba devondba closed this Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get-DbaDbRestoreHistory - additional restore point info request
2 participants