A modern, self-hosted backup solution for secure, encrypted backups across local and cloud storage.
feat: adds the ability to create S3 Compatible storage
towfiqi7e93171fb5b0
diff --git a/backend/src/utils/providers.ts b/backend/src/utils/providers.tsindex 45b2fa7..6969a33 100644--- a/backend/src/utils/providers.ts+++ b/backend/src/utils/providers.ts@@ -77,6 +77,7 @@ import fileluSettings from './providers/filelu';import filenSettings from './providers/filen';import internxtSettings from './providers/internxt';import shadeSettings from './providers/shade';+import s3CompatibleSettings from './providers/s3compatible';import type { ProviderSetting } from './providers/types';export interface ProviderConfig {@@ -1395,4 +1396,35 @@ export const providers: Record<string, ProviderConfig> = {'true',],},+ s3compatible: {+ name: 'S3 Compatible Storage',+ authTypes: ['client'],+ settings: s3CompatibleSettings,+ features: providerFeatures['s3'],+ s3Adapter: true,+ setup: creds => {+ const args = [+ 'provider',+ 'Other',+ 'access_key_id',+ creds.access_key_id,+ 'secret_access_key',+ creds.secret_access_key,+ ];+ if (creds.acl) {+ args.push('acl', creds.acl);+ }+ if (creds.region) {+ args.push('region', creds.region);+ }+ if (creds.location_constraint) {+ args.push('location_constraint', creds.location_constraint);+ }+ if (creds.endpoint) {+ args.push('endpoint', creds.endpoint);+ }++ return args;+ },+ },};diff --git a/backend/src/utils/providers/s3compatible.ts b/backend/src/utils/providers/s3compatible.tsnew file mode 100644index 0000000..003b1ca--- /dev/null+++ b/backend/src/utils/providers/s3compatible.ts@@ -0,0 +1,92 @@+import s3Options from './_s3Options';++const s3CompatibleSettings = [+ {+ label: 'Endpoint',+ value: 'endpoint',+ fieldType: 'string',+ authFieldType: 'client',+ required: false,+ default: '',+ description: 'Endpoint for S3-compatible storage API endpoint.',+ command: '--s3-endpoint',+ },+ {+ label: 'Access Key ID',+ value: 'access_key_id',+ fieldType: 'string',+ authFieldType: 'client',+ required: true,+ default: '',+ description: 'Access Key ID for S3-compatible storage.',+ command: '--s3-access-key-id',+ condition: [{ env_auth: false }],+ },+ {+ label: 'Secret Access Key',+ value: 'secret_access_key',+ fieldType: 'string',+ authFieldType: 'client',+ required: true,+ default: '',+ description: 'Secret Access Key (password) for S3-compatible storage.',+ command: '--s3-secret-access-key',+ condition: [{ env_auth: false }],+ },+ {+ label: 'Bucket Name',+ value: 'bucket',+ fieldType: 'string',+ authFieldType: 'client',+ required: true,+ default: '',+ description: 'Your S3-compatible storage Bucket Name. eg: pluton-backup',+ command: '',+ },+ {+ label: 'Region',+ value: 'region',+ fieldType: 'string',+ authFieldType: 'client',+ required: false,+ default: '',+ description: 'Region to connect to for S3-compatible storage.',+ command: '--s3-region',+ },+ {+ label: 'Location Constraint',+ value: 'location_constraint',+ fieldType: 'string',+ authFieldType: 'client',+ required: false,+ default: '',+ description:+ 'Location constraint - must be set to match the Region. Used when creating buckets only.',+ command: '--s3-location-constraint',+ },+ {+ label: 'ACL',+ value: 'acl',+ fieldType: 'select',+ allowCustom: true,+ authFieldType: 'client',+ required: false,+ default: '',+ description:+ 'Canned ACL used when creating buckets and storing or copying objects for S3-compatible storage. This ACL is used for creating objects and, if Bucket ACL is not set, for creating buckets too.',+ command: '--s3-acl',+ options: [+ { label: 'Default (private)', value: '' },+ { label: 'Private', value: 'private' },+ { label: 'Public Read', value: 'public-read' },+ { label: 'Public Read/Write', value: 'public-read-write' },+ { label: 'Authenticated Read', value: 'authenticated-read' },+ { label: 'Bucket Owner Read', value: 'bucket-owner-read' },+ { label: 'Bucket Owner Full Control', value: 'bucket-owner-full-control' },+ { label: 'Custom', value: 'custom' },+ ],+ },+ ...s3Options,+];++export default s3CompatibleSettings;diff --git a/frontend/public/providers/s3compatible.png b/frontend/public/providers/s3compatible.pngnew file mode 100644index 0000000..d84d767Binary files /dev/null and b/frontend/public/providers/s3compatible.png differ