dgraph-io/dgraph · error
failed to read master manifest:
Error message
failed to read master manifest:
What it means
getConsolidatedManifest first tries to read the existing master manifest (manifest.yaml) at the backup root via readMasterManifest. This error wraps any failure of that read (I/O error, permissions, malformed content) so GetManifestNoUpgrade callers see that the master manifest could not be loaded.
Source
Thrown at worker/backup_manifest.go:124
}
if req.BackupNum > 0 {
if len(manifests) < int(req.BackupNum) {
return nil, errors.Errorf("not enough backups to restore manifest with backupNum %d",
req.BackupNum)
}
manifests = manifests[len(manifests)-int(req.BackupNum):]
}
return manifests, nil
}
// getConsolidatedManifest walks over all the backup directories and generates a master manifest.
func getConsolidatedManifest(h UriHandler, uri *url.URL) (*MasterManifest, error) {
// If there is a master manifest already, we just return it.
if h.FileExists(backupManifest) {
manifest, err := readMasterManifest(h, backupManifest)
if err != nil {
return &MasterManifest{}, errors.Wrap(err, "failed to read master manifest: ")
}
return manifest, nil
}
// Otherwise, we create a master manifest by going through all the backup directories.
paths := h.ListPaths("")
var manifestPaths []string
suffix := filepath.Join(string(filepath.Separator), backupManifest)
for _, p := range paths {
if strings.HasSuffix(p, suffix) {
manifestPaths = append(manifestPaths, p)
}
}
sort.Strings(manifestPaths)
var mlist []*Manifest
View on GitHub (pinned to 759e242be6)
Solutions
- Verify storage credentials/permissions for the backup URI and retry.
- Inspect the master manifest file for corruption; re-upload or repair it.
- Delete the corrupt master manifest so it is regenerated from per-backup manifests (getConsolidatedManifest rebuilds it).
- Check network/proxy connectivity to the storage backend.
Example fix
// before: corrupt master manifest blocks reads aws s3 rm s3://bucket/backup/manifest.yaml // after: it is regenerated from individual backup manifests on next read
Defensive patterns
Strategy: try-catch
Validate before calling
ok, err := storageAccessible(uri, "manifest.yaml")
if err != nil || !ok {
return fmt.Errorf("master manifest unreadable at %s: %v", uri, err)
} Try / catch
manifest, err := GetManifestNoUpgrade(h, uri)
if err != nil && strings.Contains(err.Error(), "failed to read master manifest") {
// validate credentials/connectivity, optionally remove corrupt master manifest and retry
if err2 := checkStorageAccess(h); err2 == nil {
manifest, err = GetManifestNoUpgrade(h, uri)
}
} Prevention
- Rotate storage credentials before expiry
- Monitor upload completion to avoid truncated master manifests
- Test backup URI readability before scheduled restores
When it happens
Trigger: GetManifestNoUpgrade is called when a master manifest file exists at the backup URI root but h.FileExists(backupManifest) is true and readMasterManifest fails — unreadable/corrupt manifest file, wrong credentials, or transient storage errors.
Common situations: Expired cloud-storage credentials; corrupted manifest file after interrupted upload; partially uploaded master manifest; object-store permission changes.
Related errors
- while Getting latest manifest:
- readManifest failed to read the file:
- cannot read manifests at location %s
- complete backup failed
- cannot export data inside DB at %s
AI-assisted analysis of dgraph-io/dgraph@759e242be6 (2026-09-01).
Data as JSON: /api/errors/953082fa1f4291bd.
Report an issue: GitHub.