{"record":{"id":"82e13c6ba1bf1c81","repo":"dgraph-io/dgraph","slug":"cannot-read-manifests-at-location-s","errorCode":null,"errorMessage":"cannot read manifests at location %s","messagePattern":"cannot read manifests at location (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"worker/backup.go","lineNumber":434,"sourceCode":"\n\tbp := NewBackupProcessor(nil, req)\n\tdefer bp.Close()\n\terr = bp.CompleteBackup(ctx, &m)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tbackupSuccessful = true\n\treturn nil\n}\n\nfunc ProcessListBackups(ctx context.Context, location string, creds *x.MinioCredentials,\n\tfullManifest bool) ([]*Manifest, error) {\n\n\tmanifests, err := ListBackupManifests(location, creds, fullManifest)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"cannot read manifests at location %s\", location)\n\t}\n\n\treturn manifests, nil\n}\n\n// BackupProcessor handles the different stages of the backup process.\ntype BackupProcessor struct {\n\t// DB is the Badger pstore managed by this node.\n\tDB *badger.DB\n\t// Request stores the backup request containing the parameters for this backup.\n\tRequest *pb.BackupRequest\n\n\t// txn is used for the iterators in the threadLocal\n\ttxn     *badger.Txn\n\tthreads []*threadLocal\n}\n\ntype threadLocal struct {","sourceCodeStart":416,"sourceCodeEnd":452,"githubUrl":"https://github.com/dgraph-io/dgraph/blob/759e242be62c91f8d084da06ad0c8d21256d9c07/worker/backup.go#L416-L452","documentation":"ProcessListBackups lists backup manifests at a given location. If ListBackupManifests fails to enumerate or read the manifests (storage backend error, bad credentials, missing location, malformed manifests), the failure is wrapped with the location so the user knows which URI could not be read.","triggerScenarios":"Calling ProcessListBackups(ctx, location, creds, fullManifest) where ListBackupManifests returns an error: URI points to a nonexistent/empty location, credentials lack ListObjects permission, storage backend is unreachable, or manifest objects are corrupt/incomplete.","commonSituations":"Typo in s3:// or minio:// path; IAM role missing s3:ListBucket; listing backups before any backup was ever taken to that location; network partition to MinIO/S3; bucket region mismatch.","solutions":["Check the wrapped inner error for the storage-level root cause","Verify the location URI is correct and at least one backup exists there","Confirm credentials have list/read permission on the bucket/prefix","Test connectivity to the storage backend, then retry the listing"],"exampleFix":"// before\nmanifests, err := ProcessListBackups(ctx, \"s3://backups/dgraph\", creds, true)\n// after\nif err := validateBackupLocation(ctx, \"s3://backups/dgraph\", creds); err != nil {\n    return fmt.Errorf(\"check location/credentials before listing: %w\", err)\n}\nmanifests, err := ProcessListBackups(ctx, \"s3://backups/dgraph\", creds, true)","handlingStrategy":"validation","validationCode":"if !strings.HasPrefix(location, \"s3://\") && !strings.HasPrefix(location, \"minio://\") && !isLocalPath(location) {\n    return errors.Errorf(\"invalid backup location %q\", location)\n}\n// optionally probe with a lightweight list before full listing","typeGuard":null,"tryCatchPattern":"manifests, err := ProcessListBackups(ctx, location, creds, full)\nif err != nil && errors.Cause(err) != nil {\n    glog.Errorf(\"cannot list at %s: %v (check creds/connectivity/bucket)\", location, errors.Cause(err))\n}","preventionTips":["Verify at least one backup exists at the location before listing","Grant list/read permissions (s3:ListBucket) to the credentials used","Validate the URI format and bucket region before listing","Smoke-test storage connectivity in CI before production backup jobs"],"tags":["backup","manifest","s3","storage"],"backgroundTag":"backup-manifest-read-failed","analyzedSha":"759e242be62c91f8d084da06ad0c8d21256d9c07","analyzedAt":"2026-09-01T14:42:12.034Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}