{"record":{"id":"8317cba716b5efea","repo":"juicedata/juicefs","slug":"2-all-entries-in-the-metadata-engine-s","errorCode":null,"errorMessage":"2. ALL entries in the metadata engine: %s","messagePattern":"2\\. ALL entries in the metadata engine: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cmd/destroy.go","lineNumber":155,"sourceCode":"\t\t}\n\t\tif num := len(sessions); num > 0 {\n\t\t\tss := make([][3]string, num)\n\t\t\tfor i, s := range sessions {\n\t\t\t\tss[i] = [3]string{strconv.FormatUint(s.Sid, 10), s.HostName, s.MountPoint}\n\t\t\t}\n\t\t\tlogger.Fatalf(\"%d sessions are active, please disconnect them first:\\n%s\", num, printSessions(ss))\n\t\t}\n\t\tvar totalSpace, availSpace, iused, iavail uint64\n\t\t_ = m.StatFS(meta.Background(), meta.RootInode, &totalSpace, &availSpace, &iused, &iavail)\n\n\t\tfmt.Printf(\" volume name: %s\\n\", format.Name)\n\t\tfmt.Printf(\" volume UUID: %s\\n\", format.UUID)\n\t\tfmt.Printf(\"data storage: %s\\n\", blob)\n\t\tfmt.Printf(\"  used bytes: %d\\n\", totalSpace-availSpace)\n\t\tfmt.Printf(\" used inodes: %d\\n\", iused)\n\t\twarn(\"The target volume will be permanently destroyed, including:\")\n\t\twarn(\"1. ALL objects in the data storage: %s\", blob)\n\t\twarn(\"2. ALL entries in the metadata engine: %s\", utils.RemovePassword(uri))\n\t\tif !ctx.Bool(\"yes\") && !userConfirmed() {\n\t\t\tlogger.Fatalln(\"Aborted.\")\n\t\t}\n\t}\n\n\tobjs, err := object.ListAll(ctx.Context, blob, \"\", \"\", true, false)\n\tif err != nil && strings.Contains(err.Error(), \"NoSuchBucket\") {\n\t\tif !ctx.Bool(\"force\") {\n\t\t\tlogger.Fatalf(\"data storage %s does not exist (error: %v); retry with \\\"--force\\\" to skip object deletion\", blob, err)\n\t\t}\n\t\tlogger.Warnf(\"data storage %s does not exist (error: %v); will skip object deletion\", blob, err)\n\t} else {\n\t\tif err != nil {\n\t\t\tlogger.Fatalf(\"list all objects: %s\", err)\n\t\t}\n\t\tprogress := utils.NewProgress(false)\n\t\tspin := progress.AddCountSpinner(\"Deleted objects\")\n\t\tvar failed int","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/cmd/destroy.go#L137-L173","documentation":"Second item of the 'juicefs destroy' destruction summary: it warns that ALL entries in the metadata engine will be deleted, showing the metadata URI with credentials stripped (utils.RemovePassword). After this, files are unrecoverable even if some objects remain in storage.","triggerScenarios":"Confirmation output of 'juicefs destroy META UUID'; appears immediately before the interactive confirm unless --yes is given.","commonSituations":"Operators confirming destruction of a volume whose metadata (inodes, chunks, symlinks, xattrs) will be erased — e.g. cleaning a test Redis/SQL database that still hosts other keys or databases.","solutions":["Confirm the printed (password-stripped) metadata URI points at the intended engine","Back up metadata first with 'juicefs dump META backup.json' if recovery might be needed","Ensure no clients are still mounted, or they will error after metadata is wiped"],"exampleFix":"// before\njuicefs destroy redis://host:6379/1 $UUID --yes\n// after (dump backup first)\njuicefs dump redis://host:6379/1 /backup/meta.json && juicefs destroy redis://host:6379/1 $UUID --yes","handlingStrategy":"validation","validationCode":"// Back up metadata before destroy\nexec.Command(\"juicefs\", \"dump\", metaURI, \"backup.json\").Run()","typeGuard":null,"tryCatchPattern":"if strings.Contains(out, \"ALL entries in the metadata engine\") && !backupExists { cancel() }","preventionTips":["Run 'juicefs dump' before any destroy","Verify the metadata URI (password-stripped) is the intended engine","Ensure no active sessions remain before wiping metadata"],"tags":["cli","destructive","metadata"],"backgroundTag":"destructive-operation-confirmation","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}