Skip to content

fix(copy_only backups): ignore copy_only backups when making the backup-chain - #59

Merged
Alex Irion (alexirion10) merged 6 commits into
factset:masterfrom
AdityaNPL:feat/ignore_copy_only_backups
Mar 11, 2021
Merged

fix(copy_only backups): ignore copy_only backups when making the backup-chain#59
Alex Irion (alexirion10) merged 6 commits into
factset:masterfrom
AdityaNPL:feat/ignore_copy_only_backups

Conversation

@AdityaNPL

@AdityaNPL Aditya Niraula (AdityaNPL) commented Feb 16, 2021

Copy link
Copy Markdown
Contributor

Edited SQL query to ignore copy_only backups when creating the backup chain


Tested against a local MSSQL instance.

Created a normal Full backup and then a copy_only Full backup
Chain started from the correct backup point and didn't contain any copy_only backups

'Error CS0854 An expression tree may not contain a call or invocation that uses optional arguments'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me! Might it be worth adding a quick docstring for the ignoreCopyOnlyBackups parameter explaining why someone might want to set it (beyond just "it ignores is_copy_only backups")?

@alexirion10 Alex Irion (alexirion10) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a better approach here is the SQL query, not filtering out is_copy_only, but instead returning an extra column "is_copy_only".
In C# code when we can filter out those results when building the backup chain

Comment thread src/SmoFacade/Database.cs Outdated
@AdityaNPL Aditya Niraula (AdityaNPL) changed the title feat(ignore_copy_only_backups): Added in the option to ignore copy_only backups fix(ignore_copy_only_backups): ignore copy_only backups when making the backup-chain Feb 24, 2021
@AdityaNPL Aditya Niraula (AdityaNPL) changed the title fix(ignore_copy_only_backups): ignore copy_only backups when making the backup-chain fix(copy_only backups): ignore copy_only backups when making the backup-chain Feb 24, 2021
@alexirion10
Alex Irion (alexirion10) merged commit 3b3af79 into factset:master Mar 11, 2021
@AdityaNPL
Aditya Niraula (AdityaNPL) deleted the feat/ignore_copy_only_backups branch March 18, 2021 14:22
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.

4 participants