{"record":{"id":"d9cce067af156331","repo":"juicedata/juicefs","slug":"changelog-is-not-enabled-use-juicefs-config-s","errorCode":null,"errorMessage":"changelog is not enabled, use `juicefs config %s --changelog` to enable it","messagePattern":"changelog is not enabled, use `juicefs config (.+?) --changelog` to enable it","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/changelog.go","lineNumber":60,"sourceCode":"\t\tFlags: []cli.Flag{\n\t\t\t&cli.Int64Flag{\n\t\t\t\tName:  \"from\",\n\t\t\t\tUsage: \"show changelog from this version (0 means from the latest)\",\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc changelog(ctx *cli.Context) error {\n\tsetup(ctx, 1)\n\tmetaUri := ctx.Args().Get(0)\n\tremovePassword(metaUri)\n\n\tm := meta.NewClient(metaUri, nil)\n\tif format, err := m.Load(true); err != nil {\n\t\treturn err\n\t} else if !format.ChangeLog {\n\t\treturn fmt.Errorf(\"changelog is not enabled, use `juicefs config %s --changelog` to enable it\", metaUri)\n\t}\n\n\tlast := ctx.Int64(\"from\")\n\treturn m.ScanChangelog(meta.Background(), last, func(ver int64, entry string) error {\n\t\tfmt.Printf(\"%d: %s\\n\", ver, entry)\n\t\treturn nil\n\t})\n}\n","sourceCodeStart":42,"sourceCodeEnd":69,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/cmd/changelog.go#L42-L69","documentation":"The `juicefs changelog` command streams the metadata engine's changelog, but this only works when changelog recording is enabled on the volume. When the loaded format has ChangeLog == false, the command aborts with a message telling you to enable it via `juicefs config <meta-uri> --changelog`.","triggerScenarios":"Running `juicefs changelog <meta-uri>` against a volume whose format was created without changelog support (or with it explicitly disabled); enabling changelog only for newer volumes while the target volume predates the feature.","commonSituations":"Operators try to tail the changelog for CDC/replication on an older volume; a volume was formatted before the changelog feature existed; someone disabled changelog via config and later attempts to read it.","solutions":["Enable it first: run `juicefs config <metaUri> --changelog`.","Re-check with `juicefs status <metaUri>` or the volume format that ChangeLog is now true.","If the metadata engine is Redis, note the changelog is stored in a dedicated key; verify no other client disabled it after enabling."],"exampleFix":"# before\njuicefs changelog redis://127.0.0.1:6379/1\n# after\njuicefs config redis://127.0.0.1:6379/1 --changelog\njuicefs changelog redis://127.0.0.1:6379/1","handlingStrategy":"validation","validationCode":"# enable then stream\nmetaUri=redis://127.0.0.1:6379/1\njuicefs config \"$metaUri\" --changelog\njuicefs status \"$metaUri\" | grep -i changelog || echo \"changelog still disabled\"","typeGuard":null,"tryCatchPattern":"if ! juicefs changelog \"$metaUri\" 2>&1 | grep -q 'not enabled'; then\n  echo changelog streaming ok\nfi","preventionTips":["Enable changelog at volume creation/rollout time if CDC or replication will be used","Check `juicefs config <metaUri>` output for the changelog flag before scripting around it","Document that changelog streaming requires an explicit opt-in flag"],"tags":["cli","metadata","changelog"],"backgroundTag":"feature-not-enabled","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}