The Problem

Modern data backup solutions require encryption, flexible scheduling, and multi-destination replication, but existing tools either lack user-friendly interfaces or force reliance on proprietary cloud services. Managing encrypted backups across diverse storage providers with granular control remains a complex task for both beginners and advanced users.

What This Does

Pluton is a self-hosted backup solution that combines Restic's incremental encryption with Rclone's multi-cloud support, wrapped in a React frontend. The core functionality is implemented in backend/src/managers/ (12 files) and backend/src/jobs/ (9 files). The system handles backup creation (BackupTask.ts), replication (ReplicationHandler.ts), and restoration (RestoreHandler.ts) through a job queue (JobQueue.ts). Encryption is managed via SecurityKeyManager.ts, while storage destinations are abstracted through BaseStorageManager.ts.

The frontend (frontend/) provides a web interface for managing backups, schedules, and restores. It interacts with the backend API defined in backend/src/routes/ (7 files). The system supports over 70 storage providers through Rclone integration, with configuration handled by StorageController.ts and StorageService.ts.

How It Is Wired

Execution begins at backend/src/index.ts, which initializes the Express server and sets up routes. The primary data flow routes through:

  1. JobProcessor.ts – Orchestrates task execution via SystemTaskManager.ts
  2. BackupHandler.ts – Coordinates the backup process with SecurityKeyManager.ts and BaseStorageManager.ts
  3. RestoreHandler.ts – Manages data restoration operations
  4. ReplicationOrchestrator.ts – Handles multi-destination replication

Critical dependencies include:

  • Database: SQLite via backend/src/db/ (schema defined in backend/src/db/schema/)
  • External tools: Restic (utils/restic/) and Rclone (utils/rclone/)
  • Scheduling: Cron jobs managed by CronManager.ts

The frontend communicates with the backend via REST APIs, with primary endpoints in backend/src/routes/. The most impactful files include:

  • BackupController.ts – Handles backup operations (1,100+ lines)
  • RestoreController.ts – Manages restore processes (~700 lines)
  • StorageController.ts – Storage provider integration (~600 lines)

How To Use It

Setup

# Clone the repository
git clone https://github.com/moses-y/pluton.git

# Install dependencies (requires pnpm)
cd pluton/backend
pnpm install

# Build the backend
pnpm run build

Configuration

Environment variables are specified in .env.template. Key configurations include:

  • Database settings (DATABASE_URL)
  • Storage provider credentials
  • Notification channels (SMTP, Slack, Discord)

Running it

# Start the backend
pnpm run dev

# For Docker deployment, use the provided docker-compose.yml
docker-compose up -d

Real-World Use

A typical workflow involves:

  1. Configuring storage destinations via the web interface
  2. Creating backup plans with retention policies
  3. Scheduling automated backups
  4. Managing restores through the UI or CLI

Example backup job creation:

# Trigger a backup via API
curl -X POST http://localhost:5173/api/backups -H "Content-Type: application/json" -d '{"planId": 1, "source": "/path/to/data"}'

Code Health & Issues

  • Security: Potential secret exposure in frontend/.env.dev (marked low severity)
  • Test Coverage: 124 test files found, but coverage metrics not available
  • Documentation: 9 doc files present, but some areas (e.g., advanced notifications) lack detail

The Bottom Line

Pluton provides a functional, self-hosted backup solution with strong encryption and multi-cloud support. The architecture is modular but complex, with significant dependencies on external tools (Restic/Rclone). Best suited for users comfortable with self-hosting and Docker. The project shows potential but would benefit from improved documentation and test coverage.