From cd9f5a9bbe11c686136a9153a85a142b37eb767f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Tr=C3=A1vn=C3=ADk?= Date: Tue, 23 Dec 2025 12:23:01 +0100 Subject: [PATCH] feat(ui): improve local repository path display and messaging - Add shared client constants file with REPOSITORY_BASE - Show effective local path in repository info tab - Update host mount warning to clarify default path is safe when using recommended Docker setup - Update README to clarify local repositories can use custom paths --- README.md | 2 +- app/client/lib/constants.ts | 2 ++ .../repository-forms/local-repository-form.tsx | 9 +++++---- app/client/modules/repositories/tabs/info.tsx | 14 ++++++++++++++ 4 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 app/client/lib/constants.ts diff --git a/README.md b/README.md index 8000055a..aef9976f 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ Now, when adding a new volume in the Zerobyte web interface, you can select "Dir A repository is where your backups will be securely stored encrypted. Zerobyte supports multiple storage backends for your backup repositories: -- **Local directories** - Store backups on local disk at `/var/lib/zerobyte/repositories/` +- **Local directories** - Store backups on local disk subfolder of `/var/lib/zerobyte/repositories/` or any other (mounted) path - **S3-compatible storage** - Amazon S3, MinIO, Wasabi, DigitalOcean Spaces, etc. - **Google Cloud Storage** - Google's cloud storage service - **Azure Blob Storage** - Microsoft Azure storage diff --git a/app/client/lib/constants.ts b/app/client/lib/constants.ts new file mode 100644 index 00000000..84464025 --- /dev/null +++ b/app/client/lib/constants.ts @@ -0,0 +1,2 @@ +/** Default base path for local repositories */ +export const REPOSITORY_BASE = "/var/lib/zerobyte/repositories"; diff --git a/app/client/modules/repositories/components/repository-forms/local-repository-form.tsx b/app/client/modules/repositories/components/repository-forms/local-repository-form.tsx index e0f5b4c1..5a31755c 100644 --- a/app/client/modules/repositories/components/repository-forms/local-repository-form.tsx +++ b/app/client/modules/repositories/components/repository-forms/local-repository-form.tsx @@ -1,6 +1,7 @@ import { useState } from "react"; import type { UseFormReturn } from "react-hook-form"; import { Check, Pencil, X, AlertTriangle } from "lucide-react"; +import { REPOSITORY_BASE } from "~/client/lib/constants"; import { Button } from "../../../../components/ui/button"; import { FormItem, FormLabel, FormDescription } from "../../../../components/ui/form"; import { DirectoryBrowser } from "../../../../components/directory-browser"; @@ -30,7 +31,7 @@ export const LocalRepositoryForm = ({ form }: Props) => { Repository Directory
- {form.watch("path") || "/var/lib/zerobyte/repositories"} + {form.watch("path") || REPOSITORY_BASE}
+ {getEffectiveLocalPath(repository) && ( +
+
Effective Local Path
+

{getEffectiveLocalPath(repository)}

+
+ )}
Created at

{new Date(repository.createdAt).toLocaleString()}