Add DB source filtering to prevent selection for restoration#97
Merged
Conversation
Owner
|
Hey @iberlob Thanks for this pull request. That sounds like a feature that makes sense to me. I'll take a look at the code tomorrow. Best regards, |
Remove a redundant/misleading sentence from the Exclude from Restore helper text in src/components/adapter/form-sections.tsx so the message only states the source won't appear as a restore target, avoiding confusion about backup creation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restore Exclusion Feature
Overview
The "Exclude from Restore" feature allows database sources to be excluded from the restore operation dropdown while maintaining their functionality for creating new backups.
Configuration
When creating or editing a database source, a new toggle switch "Exclude from Restore" appears in the Configuration tab. This switch lets you mark the source as unavailable for restoration purposes.
Behavior
Enabled: When the toggle is active, the source will not appear in the dropdown list when users initiate a database restore operation.
Disabled (default): The source appears normally in all restore dropdowns.
Independent: The exclusion flag only affects restore operations. The source continues to work normally for:
Creating new backups
Scheduling backup jobs
Health checks
Use Cases
Test/Development Sources: Exclude staging database sources to prevent accidental production data overwrites during restore operations.
Deprecated Sources: Hide sources that are no longer actively used without deleting them.
Safety Mechanism: Prevent users from selecting certain critical sources as restore destinations.
Technical Implementation
The exclusion flag is stored in the adapter's metadata and is checked during the source filtering process when rendering the restore dialog. The filtering is safe and handles malformed metadata gracefully.
As before, if you don't see it as useful or necessary, feel free to discard it
Thx!