From 122f351555be8942f579fac66b909c62e5b27269 Mon Sep 17 00:00:00 2001 From: Renan Bernordi Date: Mon, 17 Nov 2025 01:00:00 -0300 Subject: [PATCH] add sftp support --- README.md | 3 +- .../components/create-repository-form.tsx | 77 +++++++++++++++++++ app/schemas/restic.ts | 12 ++- .../repositories/repositories.service.ts | 5 +- app/server/utils/restic.ts | 9 +++ 5 files changed, 103 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2ea629ac..c61906d2 100644 --- a/README.md +++ b/README.md @@ -103,9 +103,10 @@ Now, when adding a new volume in the Ironmount web interface, you can select "Di A repository is where your backups will be securely stored encrypted. Ironmount supports multiple storage backends for your backup repositories: - **Local directories** - Store backups on local disk at `/var/lib/ironmount/repositories/` -- **S3-compatible storage** - Amazon S3, MinIO, Wasabi, DigitalOcean Spaces, etc. +- **S3-compatible storage** - Amazon S3, MinIO, Wasabi, DigitalOcean Spaces, Cloudflare R2, etc. - **Google Cloud Storage** - Google's cloud storage service - **Azure Blob Storage** - Microsoft Azure storage +- **SFTP** - Secure File Transfer Protocol - **rclone remotes** - 40+ cloud storage providers via rclone (see below) Repositories are optimized for storage efficiency and data integrity, leveraging Restic's deduplication and encryption features. diff --git a/app/client/components/create-repository-form.tsx b/app/client/components/create-repository-form.tsx index 724eda8f..230e42b0 100644 --- a/app/client/components/create-repository-form.tsx +++ b/app/client/components/create-repository-form.tsx @@ -42,6 +42,7 @@ const defaultValuesForType = { azure: { backend: "azure" as const, compressionMode: "auto" as const }, rclone: { backend: "rclone" as const, compressionMode: "auto" as const }, rest: { backend: "rest" as const, compressionMode: "auto" as const }, + sftp: { backend: "sftp" as const, compressionMode: "auto" as const, port: 22 }, }; export const CreateRepositoryForm = ({ @@ -128,6 +129,7 @@ export const CreateRepositoryForm = ({ Google Cloud Storage Azure Blob Storage REST Server + SFTP @@ -609,6 +611,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" && (