Add incremental backup support - #459
Open
dudanogueira wants to merge 3 commits into
Open
Conversation
Adds .withIncrementalBaseBackupId() to BackupCreator so the incremental_base_backup_id field is sent on backup creation, plus validation rejecting an empty base ID or one equal to the backup being created.
client.backup.create() and collection.backup.create() now accept incrementalBaseBackupId. The request is gated client-side on Weaviate >=1.37.0 via DbVersionSupport.supportsIncrementalBackups() and throws WeaviateUnsupportedFeatureError on older servers. The base backup ID is also surfaced on getCreateStatus() and list(), which Weaviate only returns to root users.
Mock tests assert the payload sent on create, the lowercasing of the base ID, the >=1.37.0 gate and the parsing of the base ID in list() and getCreateStatus(). Integration tests create an incremental backup on top of a base backup and restore it.
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
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.
Exposes Weaviate's file-based incremental backups (server
v1.37.0+) in the client:Changes
incrementalBaseBackupIdonclient.backup.create()andcollection.backup.create(), plus.withIncrementalBaseBackupId()on the v2 builder.DbVersionSupport.supportsIncrementalBackups()— throwsWeaviateUnsupportedFeatureErrorbelow1.37.0, matching the Python client.getCreateStatus()andlist(). Weaviate only returns it to root users, so it may beundefinedeven for an incremental backup.Notes for reviewers
backup(connection)now takesdbVersionSupportas a second argument (same forbackupCollection). Both are internal factories — only types are re-exported publicly.list()no longer returns the raw payload verbatim:incremental_base_backup_idis mapped toincrementalBaseBackupId. Everything else is passed through unchanged.Testing
Mock tests cover the request payload, lowercasing, the version gate (1.36 vs 1.37) and response parsing. Integration tests create an incremental backup on top of a base backup and restore it — verified against Weaviate
1.38.0.🤖 Generated with Claude Code
https://claude.ai/code/session_01Gc9nJTnKeYs41fidZAYWf6