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()}