{"record":{"id":"1bc6d7e033ef50f3","repo":"dgraph-io/dgraph","slug":"while-retrieving-manifests","errorCode":null,"errorMessage":"while retrieving manifests","messagePattern":"while retrieving manifests","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"worker/online_restore.go","lineNumber":43,"sourceCode":"\t\"github.com/dgraph-io/badger/v4/options\"\n\t\"github.com/dgraph-io/dgraph/v25/conn\"\n\t\"github.com/dgraph-io/dgraph/v25/posting\"\n\t\"github.com/dgraph-io/dgraph/v25/protos/pb\"\n\t\"github.com/dgraph-io/dgraph/v25/schema\"\n\t\"github.com/dgraph-io/dgraph/v25/tok/hnsw\"\n\t\"github.com/dgraph-io/dgraph/v25/x\"\n)\n\nconst (\n\terrRestoreProposal = \"cannot propose restore request\"\n)\n\n// verifyRequest verifies that the manifest satisfies the requirements to process the given\n// restore request.\nfunc verifyRequest(h UriHandler, uri *url.URL, req *pb.RestoreRequest, currentGroups []uint32) error {\n\tmanifests, err := getManifestsToRestore(h, uri, req)\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"while retrieving manifests\")\n\t}\n\tif len(manifests) == 0 {\n\t\treturn errors.Errorf(\"No backups with the specified backup ID %s\", req.GetBackupId())\n\t}\n\n\t// TODO(Ahsan): Do we need to verify the manifests again here?\n\tif err := verifyManifests(manifests); err != nil {\n\t\treturn err\n\t}\n\n\tlastManifest := manifests[0]\n\tif len(currentGroups) != len(lastManifest.Groups) {\n\t\treturn errors.Errorf(\"groups in cluster and latest backup manifest differ\")\n\t}\n\n\tfor _, group := range currentGroups {\n\t\tif _, ok := lastManifest.Groups[group]; !ok {\n\t\t\treturn errors.Errorf(\"groups in cluster and latest backup manifest differ\")","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/dgraph-io/dgraph/blob/759e242be62c91f8d084da06ad0c8d21256d9c07/worker/online_restore.go#L25-L61","documentation":"During an online restore, verifyRequest calls getManifestsToRestore to list and read backup manifest objects from the backup location (URI handler). Any error opening, listing, or decoding those manifests is wrapped as \"while retrieving manifests\". This indicates the backup storage could not be read or the manifests are missing/corrupt, so restore verification aborts.","triggerScenarios":"Calling VerifyBackup (or restore) where the backup URI is wrong or credentials are missing, the object store is unreachable, no objects exist under the backup ID (or manifest objects are unreadable/corrupt), causing getManifestsToRestore to fail and the error to be wrapped.","commonSituations":"Misconfigured s3/minio credentials or bucket name in the backup URL; network/firewall blocking access to object storage; backups deleted or overwritten; restoring from a partially completed backup; using the wrong backup ID or path prefix.","solutions":["Verify the backup URI and credentials: test listing the bucket/prefix with the same tooling (aws s3 ls / mc ls) used in the URI","Confirm the backup ID matches an existing backup under that URI and that manifest objects (manifest.json files) exist and are readable","Check Alpha logs for the underlying wrapped error (e.g. access denied, no such bucket, connection refused) and fix storage access/networking"],"exampleFix":"// before\nGRAPHICS URI: dgraph restore -x s3://wrong-bucket/backups -b backup-2024\n// after\ndgraph restore -x s3://correct-bucket/dgraph -b backup-2024  # verify with aws s3 ls first","handlingStrategy":"try-catch","validationCode":"// before restore: verify manifests are listable\nh := urfavecliHandler // your UriHandler\nu, _ := url.Parse(backupUri)\nif _, err := h.List(u); err != nil {\n    return fmt.Errorf(\"backup location unreachable: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"if err := verifyRequest(h, uri, req, groups); err != nil {\n    if strings.Contains(err.Error(), \"while retrieving manifests\") {\n        log.Printf(\"check backup URI %s, credentials, and backup ID %s: %v\", uri, req.BackupId, err)\n    }\n    return err\n}","preventionTips":["Validate bucket access and credentials with the same URI before every restore","Keep manifest objects intact: never delete or partially overwrite backup prefixes","Log the underlying wrapped error, not just the wrap message, to diagnose storage issues"],"tags":["dgraph","restore","backup","object-storage","io"],"backgroundTag":"backup-manifest-retrieval-failed","analyzedSha":"759e242be62c91f8d084da06ad0c8d21256d9c07","analyzedAt":"2026-09-01T14:42:12.034Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}