mirror of
https://github.com/nicotsx/zerobyte.git
synced 2026-04-17 21:37:06 -04:00
* refactor: strip out volume path in snapshot list / restore chore: lint issue * test: backups new include patterns
12 lines
298 B
TypeScript
12 lines
298 B
TypeScript
import type { Volume } from "./types";
|
|
|
|
const VOLUME_MOUNT_BASE = "/var/lib/zerobyte/volumes";
|
|
|
|
export const getVolumeMountPath = (volume: Volume): string => {
|
|
if (volume.config.backend === "directory") {
|
|
return volume.config.path;
|
|
}
|
|
|
|
return `${VOLUME_MOUNT_BASE}/${volume.shortId}/_data`;
|
|
};
|