feat (backup): improve lsbackup tool#9693
Merged
matthewmcneely merged 2 commits intomainfrom Apr 29, 2026
Merged
Conversation
3f9e8f5 to
577a5c6
Compare
This comment has been minimized.
This comment has been minimized.
matthewmcneely
requested changes
Apr 27, 2026
Contributor
|
@shiva-istari Also, don't forget to open a PR in the dgraph-docs repos, lots of changes to both the cli and the api here. |
dd5c339 to
6984e9d
Compare
matthewmcneely
approved these changes
Apr 28, 2026
6984e9d to
aebddf4
Compare
aebddf4 to
fb42ac5
Compare
43bd132 to
f3a899e
Compare
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.
Fixes #9684
Improve
lsbackupToolUser-Facing Changes
CLI:
dgraph lsbackup--since-datestring--until-datestring--last-n-daysint--since-date)--summarybool--verboseboolmanifest.jsonto include predicate groups and drop operations. Without it, the lightermanifest_summary.jsonis used.Example usage:
GraphQL:
listBackupsQueryNew optional input fields on the
listBackupsadmin query:sinceDateStringuntilDateStringlastNDaysIntsinceDate)fullManifestBooleantrue, reads the full manifest including predicate groups and drop ops. Defaultfalse.Example query:
Backup Output: New
manifest_summary.jsonEvery backup now writes a
manifest_summary.jsonalongsidemanifest.json. This is a lightweight version that omits predicate groups and drop operations, making listing operations faster for large backup histories. The fullmanifest.jsonremains unchanged and is still used for restore.Internal / Developer Changes
New types in
workerpackage:ManifestBase— shared fields between full and summary manifestsMasterManifestSummary— lightweight manifest container (no groups/drop ops)BackupDateFilter— date-range filter withSinceandUntilpointersBackupListStats— summary statistics structNew functions in
workerpackage:FilterManifestsByDate()— filters manifests by aBackupDateFilterComputeBackupListStats()— computes aggregate stats over a manifest listSignature changes:
ListBackupManifests()— newforceFull boolparameter (3rd arg)ProcessListBackups()— newforceFull boolparameter (4th arg)Files Changed
worker/backup_manifest.goworker/backup.gomanifest_summary.jsonduring backup; updated signaturesworker/backup_handler.goProcessListBackupssignaturebackup/run.gographql/admin/list_backups.gofullManifestgraphql/admin/endpoints.goNew Test Files
backup/run_test.gographql/admin/list_backups_test.goworker/backup_manifest_test.goFilterManifestsByDate,ComputeBackupListStats, summary serializationsystest/backup/filesystem/backup_test.gosystest/integration2/backup_summary_compat_test.gomanifest_summary.jsonis missing