From ae1d822260cecd733b7979c332db623e618001f2 Mon Sep 17 00:00:00 2001 From: Renan Bernordi Date: Mon, 17 Nov 2025 00:38:41 -0300 Subject: [PATCH] add restic sftp support --- .../components/create-repository-form.tsx | 77 +++++++++++++++++++ app/schemas/restic.ts | 13 +++- .../repositories/repositories.service.ts | 5 +- app/server/utils/restic.ts | 9 +++ 4 files changed, 102 insertions(+), 2 deletions(-) diff --git a/app/client/components/create-repository-form.tsx b/app/client/components/create-repository-form.tsx index f9e2ab6a..d04c4adc 100644 --- a/app/client/components/create-repository-form.tsx +++ b/app/client/components/create-repository-form.tsx @@ -41,6 +41,7 @@ const defaultValuesForType = { gcs: { backend: "gcs" as const, compressionMode: "auto" as const }, azure: { backend: "azure" as const, compressionMode: "auto" as const }, rclone: { backend: "rclone" as const, compressionMode: "auto" as const }, + sftp: { backend: "sftp" as const, compressionMode: "auto" as const, port: 22 }, }; export const CreateRepositoryForm = ({ @@ -126,6 +127,7 @@ export const CreateRepositoryForm = ({ Cloudflare R2 Google Cloud Storage Azure Blob Storage + SFTP @@ -546,6 +548,81 @@ export const CreateRepositoryForm = ({ ))} + {watchedBackend === "sftp" && ( + <> + ( + + Server + + + + SFTP/SSH server hostname or IP address. + + + )} + /> + ( + + Port + + + + SSH server port (default: 22). + + + )} + /> + ( + + Username + + + + SSH account username. + + + )} + /> + ( + + Password + + + + SSH account password. + + + )} + /> + ( + + Path + + + + Remote path on the SFTP server where backups will be stored. + + + )} + /> + + )} + {mode === "update" && (