feat: exclude specific xattr during restore

This commit is contained in:
Nicolas Meienberger
2025-11-22 17:39:08 +01:00
parent 6c30e7e357
commit a622b5e689
8 changed files with 179 additions and 25 deletions

View File

@@ -15,7 +15,7 @@ const listRepositories = async () => {
};
const encryptConfig = async (config: RepositoryConfig): Promise<RepositoryConfig> => {
const encryptedConfig: Record<string, string | boolean> = { ...config };
const encryptedConfig: Record<string, string | boolean | number> = { ...config };
if (config.customPassword) {
encryptedConfig.customPassword = await cryptoUtils.encrypt(config.customPassword);
@@ -193,7 +193,7 @@ const listSnapshotFiles = async (name: string, snapshotId: string, path?: string
const restoreSnapshot = async (
name: string,
snapshotId: string,
options?: { include?: string[]; exclude?: string[]; delete?: boolean },
options?: { include?: string[]; exclude?: string[]; excludeXattr?: string[]; delete?: boolean },
) => {
const repository = await db.query.repositoriesTable.findFirst({
where: eq(repositoriesTable.name, name),