Skip to content

feat: add SFTP, FTP, and Google Drive backup destinations (#168)#1456

Open
Gengyscan wants to merge 63 commits intoCortexFlow-AI:canaryfrom
Gengyscan:feat/backup-destinations
Open

feat: add SFTP, FTP, and Google Drive backup destinations (#168)#1456
Gengyscan wants to merge 63 commits intoCortexFlow-AI:canaryfrom
Gengyscan:feat/backup-destinations

Conversation

@Gengyscan
Copy link

/claim #168

Summary

Extends the existing S3-only backup destination system to support SFTP, FTP, and Google Drive via rclone's built-in backends. Zero breaking changes — existing S3 destinations continue to work unchanged.

Changes

Schema (destination.ts)

  • Added destinationType column (enum: s3, sftp, ftp, gdrive, default: s3)
  • Added host, port, username, password, remoteBasePath columns for SFTP/FTP
  • Made S3-specific columns (accessKey, secretAccessKey, bucket, region, endpoint) optional
  • Zod discriminatedUnion validation ensures type-safe input per destination type

Backend (utils.ts)

  • getRcloneFlags(destination) — dispatches correct rclone CLI flags by destinationType
  • getRcloneRemotePath(destination, subpath) — builds :s3:, :sftp:, :ftp:, :drive: remote paths
  • getS3Credentials alias preserved for backward compatibility
  • All 7 backup, 6 restore, and 3 volume-backup files updated to use generic functions
  • testConnection router uses generic rclone functions

Frontend (handle-destinations.tsx)

  • Destination type selector dropdown (S3 / SFTP / FTP / Google Drive)
  • Conditional field rendering per type with proper validation
  • Edit mode correctly loads existing destination data
  • Title changed from 'S3 Destinations' to 'Backup Destinations'

Migration

  • 0153_backup_destinations.sql — 10 ALTER statements (add columns + relax NOT NULL)

Testing

  • S3 destinations continue to work unchanged (backward compatible)
  • SFTP: tested with atmoz/sftp Docker container
  • FTP: tested with fauria/vsftpd Docker container
  • All rclone flags verified against rclone documentation

Files Changed (23)

Area Files
Schema packages/server/src/db/schema/destination.ts
Core utils packages/server/src/utils/backups/utils.ts
Backups postgres, mysql, mariadb, mongo, compose, web-server, index
Restores postgres, mysql, mariadb, mongo, compose, web-server
Volume backups backup, restore, utils
Router apps/dokploy/server/api/routers/destination.ts
Frontend handle-destinations.tsx, show-destinations.tsx
Migration 0153_backup_destinations.sql, _journal.json

cucumber-sp and others added 30 commits February 13, 2026 19:14
Add tag management system that allows users to create, edit, and delete
tags scoped to their organization, and assign them to projects for
better organization and filtering.

- Add tag and project_tag database schemas with Drizzle migration
- Add tRPC router for tag CRUD and project-tag assignment operations
- Add tag management page in Settings with color picker
- Add tag selector to project create/edit form
- Add tag filter to project list with localStorage persistence
- Display tag badges on project cards
Show only the count inside the filter button instead of rendering
individual tag badges alongside it.
Remove variant="blank" (forced h-4) and flex-1 (full width stretch)
to match the tag badge appearance from the settings page.
Replace duplicated inline badge styling with a reusable TagBadge
component to ensure consistent appearance across all tag displays.
Remove deleted tag IDs from the selected filter state when the
available tags list changes.
switchers

- Create AdvanceBreadcrumb component with searchable dropdowns
- Add project selector with environment expansion support
- Add service selector for quick switching between services
- Add environment selector badge for multi-environment projects
- Replace BreadcrumbSidebar with new component across all service pages
- Update projects page, environment page, and all service detail pages
  (application, compose, postgres, mysql, mariadb, redis, mongo)
…utilizing URL query parameters for ID retrieval
Enable file upload deployments via the public API, unlocking CI/CD workflows
similar to `railway up`. Users can now programmatically deploy by uploading
zip archives.

Depends on: Dokploy/trpc-openapi multipart/form-data support
Switch from z.instanceof(FormData) to uploadFileSchema (zod-form-data)
so the OpenAPI generator produces a proper multipart/form-data spec
with typed fields (zip as binary, applicationId, dropBuildPath).

Regenerate openapi.json with the drop-deployment endpoint included.
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
- Introduced a new settings.json file to define permissions for various Bash commands and set the default mode to bypassPermissions.
- Updated the version in package.json to v0.28.7.
- Deleted the settings.json file that defined permissions for various Bash commands and the default mode for Claude.
- Updated the error message formatting in both database and volume backup notification functions to limit the displayed message length, ensuring better readability and preventing overflow.
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…ications-fail-due-to-content-exceeding-max-embed-length

fix: truncate error message in backup notifications to 1010 characters
…bby and startup tiers

- Replaced single server quantity state with separate states for hobby and startup server quantities.
- Adjusted calculations and UI elements to reflect the new state management for each tier.
- Ensured proper handling of server quantity in pricing calculations and button states.
Siumauricio and others added 30 commits March 18, 2026 16:26
- Modified the apikey table to drop the user_id column and replace it with reference_id, establishing a foreign key relationship with the user table.
- Added config_id column with a default value to the apikey table.
- Updated related code in the account schema and user service to reflect these changes.
- Enhanced the journal and snapshot files to include the latest schema updates.
…g-and-unbale-to-generate-new-ones-after-upgrade-to-0287

feat: update apikey schema and relationships
- Changed the authorization check for deleting an API key to use referenceId instead of userId, ensuring proper validation against the current user's ID.
- Added health check functionality for PostgreSQL, Redis, and Traefik services before updating the web server.
- Introduced a modal state management system to guide users through the verification and update process.
- Updated UI components to display service health status and relevant messages during the update workflow.
- Refactored the update server button to reflect the latest version and availability of updates.
…ess-to-validate-dokploy-services

feat: enhance web server update process with health checks
- Bumped the version of @dokploy/trpc-openapi in both package.json and pnpm-lock.yaml.
- Removed unnecessary metadata from the dropDeployment procedure in application.ts.
…ent-api

feat: expose drop deployment endpoint in public API
- Changed input class from "focus:ring-0" to "focus-visible:ring-0" for improved accessibility and visual feedback on focus.
…cher

feat(ui): Add Vercel-style breadcrumb navigation with project and service switchers
…-unhandled-rejection

fix: prevent unhandled rejection in trustedOrigins on DB failure
…raints

- Introduced new SQL migration to create 'project_tag' and 'tag' tables.
- Added unique constraints and foreign key relationships to ensure data integrity.
- Updated journal and snapshot metadata to reflect the new migration.
- Added a new HandleTag component to manage tag creation and updates with validation.
- Integrated color selection and real-time preview for tags.
- Updated tag management references in TagFilter and TagSelector components to use the new HandleTag component.
- Integrated user permissions for tag creation, updating, and deletion in the TagManager component.
- Updated API routes to enforce permission checks for tag operations.
- Added new permissions for managing tags in the roles configuration.
- Improved error handling for unauthorized access in tag-related operations.
- Replaced role-based access control with permission-based checks for tag visibility in the side menu.
- Updated API route handlers to utilize protected procedures for tag queries, enhancing security and consistency in permission management.
- Added error handling for user permission fetching in the server-side props.
- Implemented a check for tag read permissions, redirecting unauthorized users to the home page.
- Enhanced the overall structure of the server-side logic for better clarity and maintainability.
- Simplified the payload construction for tag creation and updates in the HandleTag component.
- Improved code readability by consolidating the conditional logic for tagId handling.
feat: add project tags for organizing services
- Upgraded 'next' version from 16.1.6 to 16.2.0 in both pnpm-lock.yaml and package.json.
- Updated related dependency versions for '@trpc/next' and '@trpc/react-query' to align with the new 'next' version.
- Adjusted version hashes for better consistency in '@better-auth' packages.
Extends the existing S3-only backup destination system to support
SFTP, FTP, and Google Drive via rclone's built-in backends.

Schema:
- Add destinationType enum (s3, sftp, ftp, gdrive)
- Add host, port, username, password, remoteBasePath columns
- Make S3-specific columns optional for non-S3 types
- Zod discriminatedUnion validation per type

Backend:
- getRcloneFlags() dispatches rclone CLI flags by destinationType
- getRcloneRemotePath() builds :s3:, :sftp:, :ftp:, :drive: paths
- getS3Credentials alias preserved for backward compatibility
- All 7 backup, 6 restore, and 3 volume-backup files updated
- testConnection uses generic rclone functions

Frontend:
- Destination type selector (S3 / SFTP / FTP / Google Drive)
- Conditional fields per type with proper validation
- Edit mode loads existing destination data correctly

Migration:
- 0153_backup_destinations.sql with 10 ALTER statements

Closes CortexFlow-AI#168
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants