{"record":{"id":"3d5dd6fa1cc5da68","repo":"dgraph-io/dgraph","slug":"cannot-retrieve-manifests-3d5dd6","errorCode":null,"errorMessage":"cannot retrieve manifests","messagePattern":"cannot retrieve manifests","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"worker/restore_map.go","lineNumber":755,"sourceCode":"// value in having these partition keys. Maybe, we can live without them.\nfunc RunMapper(req *pb.RestoreRequest, mapDir string) (*mapResult, error) {\n\turi, err := url.Parse(req.Location)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif req.RestoreTs == 0 {\n\t\treturn nil, errors.New(\"RestoreRequest must have a valid restoreTs\")\n\t}\n\n\tcreds := getCredentialsFromRestoreRequest(req)\n\th, err := NewUriHandler(uri, creds)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tmanifests, err := getManifestsToRestore(h, uri, req)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"cannot retrieve manifests\")\n\t}\n\tglog.Infof(\"Got %d backups to restore \", len(manifests))\n\n\tcfg, err := getEncConfig(req)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"unable to get encryption config\")\n\t}\n\tkeys, err := x.GetEncAclKeys(cfg)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"unable to get encryption keys\")\n\t}\n\n\tmapper := &mapper{\n\t\tbuf:       z.NewBuffer(mapFileSz, \"Restore.Buffer\"),\n\t\tthr:       y.NewThrottle(3),\n\t\tbufLock:   &sync.Mutex{},\n\t\tcloser:    z.NewCloser(1),\n\t\treqCh:     make(chan listReq, 3),","sourceCodeStart":737,"sourceCodeEnd":773,"githubUrl":"https://github.com/dgraph-io/dgraph/blob/759e242be62c91f8d084da06ad0c8d21256d9c07/worker/restore_map.go#L737-L773","documentation":"RunMapper wraps any failure from getManifestsToRestore — the step that lists the backup location via the URI handler and parses the manifest files — with 'cannot retrieve manifests'. The underlying error (network, credentials, missing/invalid manifest) is preserved by errors.Wrapf.","triggerScenarios":"getManifestsToRestore fails because the object store is unreachable, credentials are wrong, the location prefix contains no valid backup manifest, or a manifest file is corrupt/mismatched with the requested BackupId/restore-to timestamp.","commonSituations":"Wrong URI/scheme in req.Location (s3://, minio://, file://) or bad bucket/path; expired or missing AWS/GCS/Azure credentials; restoring from a location where no full backup exists at or before RestoreTs; firewall blocking egress to the storage endpoint.","solutions":["Read the wrapped cause in the error chain to see the actual storage/parse failure.","Verify req.Location scheme, bucket and prefix, and that credentials (via getCredentialsFromRestoreRequest) are valid for that store.","Confirm the location actually contains a valid backup: run `dgraph backup -l` equivalent listing or inspect the manifest objects directly.","If restoring to a point in time, ensure a full backup exists at or before the requested SinceTs/RestoreTs.","Test connectivity from the host (e.g. aws s3 ls / gsutil ls on the same path) to rule out network/permissions."],"exampleFix":"// before\nreq := &pb.RestoreRequest{Location: \"s3://wrong-bucket/backups\"}\n// after\nreq := &pb.RestoreRequest{Location: \"s3://correct-bucket/dgraph-backups\", AccessKey: ak, SecretKey: sk, RestoreTs: ts}","handlingStrategy":"try-catch","validationCode":"// pre-flight: verify the location is listable with the same creds\nerr := probeBackupLocation(req.Location, creds) // aws s3 ls / gsutil equivalent\nif err != nil { return fmt.Errorf(\"backup location unreachable: %w\", err) }","typeGuard":null,"tryCatchPattern":"if _, err := worker.RunMapper(req, mapDir); err != nil {\n    if strings.Contains(err.Error(), \"cannot retrieve manifests\") {\n        // inspect errors.Cause(err) for storage/credential issue\n        return fmt.Errorf(\"check location, credentials and manifest presence: %w\", err)\n    }\n    return err\n}","preventionTips":["Validate req.Location scheme/bucket/prefix before restore","Store and rotate storage credentials properly","Ensure a full backup exists at or before the target RestoreTs"],"tags":["dgraph","restore","object-storage","manifest","network"],"backgroundTag":"backup-manifest-not-found","analyzedSha":"759e242be62c91f8d084da06ad0c8d21256d9c07","analyzedAt":"2026-09-01T14:42:12.034Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}