{"record":{"id":"5b934ba9db6aff8e","repo":"weaviate/weaviate","slug":"invalid-backup-path-provided","errorCode":null,"errorMessage":"invalid backup path provided","messagePattern":"invalid backup path provided","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/backup-filesystem/backup.go","lineNumber":223,"sourceCode":"\t\tmetric.Add(float64(read))\n\t}\n\treturn read, err\n}\n\nfunc (m *Module) SourceDataPath() string {\n\treturn m.dataPath\n}\n\nfunc (m *Module) initBackupBackend(ctx context.Context, backupsPath string) error {\n\tif backupsPath == \"\" {\n\t\treturn fmt.Errorf(\"empty backup path provided\")\n\t}\n\tbackupsPath = filepath.Clean(backupsPath)\n\tif !filepath.IsAbs(backupsPath) {\n\t\treturn fmt.Errorf(\"relative backup path provided\")\n\t}\n\tif err := m.createBackupsDir(backupsPath); err != nil {\n\t\treturn errors.Wrap(err, \"invalid backup path provided\")\n\t}\n\tm.backupsPath = backupsPath\n\n\treturn nil\n}\n\nfunc (m *Module) createBackupsDir(backupsPath string) error {\n\tif err := os.MkdirAll(backupsPath, os.ModePerm); err != nil {\n\t\tm.logger.WithField(\"module\", m.Name()).\n\t\t\tWithField(\"action\", \"create_backups_dir\").\n\t\t\tWithError(err).\n\t\t\tErrorf(\"failed creating backups directory %v\", backupsPath)\n\t\treturn backup.NewErrInternal(errors.Wrap(err, \"make backups dir\"))\n\t}\n\treturn nil\n}\n","sourceCodeStart":205,"sourceCodeEnd":240,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/modules/backup-filesystem/backup.go#L205-L240","documentation":"This error wraps the failure of createBackupsDir during initBackupBackend, which runs when the backup-filesystem module is initialized at Weaviate startup with ENABLE_MODULES=backup-filesystem. The underlying cause is that the configured backups path could not be created or was rejected (e.g. relative path -> 'relative backup path provided'), so the module aborts initialization. It indicates a configuration or filesystem problem with the backups directory, not a problem with a specific backup request.","triggerScenarios":"Module init at server start: the path configured as PERSISTENCE_DATA_PATH (or backups path) is relative (fails immediately with 'relative backup path provided'), or os.MkdirAll of the cleaned absolute path fails due to permissions, an existing file at that path, or an unusable mount.","commonSituations":"BACKUP_FILESYSTEM_PATH/PERSISTENCE_DATA_PATH set to a relative value in env config; container user cannot create the directory under the given root; the path points into a not-yet-mounted or read-only volume at startup.","solutions":["Set the backups path to an absolute path (filepath.IsAbs must be true) in the module config/env.","Read the wrapped inner error: 'relative backup path provided' means fix the config; otherwise fix the filesystem issue reported by createBackupsDir.","Pre-create the directory and give the weaviate process user ownership/write permission.","If the path lives on a mounted volume, verify the mount is ready and writable before starting Weaviate."],"exampleFix":"// before\nENABLE_MODULES=backup-filesystem\nPERSISTENCE_DATA_PATH=./data   # relative -> rejected\n// after\nENABLE_MODULES=backup-filesystem\nPERSISTENCE_DATA_PATH=/var/lib/weaviate/data","handlingStrategy":"validation","validationCode":"p := filepath.Clean(os.Getenv(\"PERSISTENCE_DATA_PATH\"))\nif !filepath.IsAbs(p) {\n    return fmt.Errorf(\"backup path must be absolute, got %q\", p)\n}\nif _, err := os.Stat(p); err != nil {\n    if err := os.MkdirAll(p, os.ModePerm); err != nil {\n        return err\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := module.Init(params); err != nil {\n    if strings.Contains(err.Error(), \"relative backup path provided\") {\n        return fmt.Errorf(\"config: set an absolute PERSISTENCE_DATA_PATH: %w\", err)\n    }\n    return err\n}","preventionTips":["Always configure backups paths as absolute paths in env/config management.","Test module initialization in CI with the same volume layout as production.","Validate that the path parent is writable by the weaviate user before rollout."],"tags":["configuration","backup","startup","filesystem"],"backgroundTag":"invalid-backup-path","analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}