Skip to content

NesoHQ/backup-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RΓΌckhalt - Backup Management System

A comprehensive backup management system for PostgreSQL databases, VPS instances, and object storage with automated scheduling and monitoring.

πŸš€ Features

  • Multi-Source Backups

    • PostgreSQL database backups
    • VPS file system backups via SSH/SFTP
    • S3-compatible object storage backups
  • Automated Scheduling

    • Cron-based backup scheduling
    • Retention policies
    • Compression and encryption
  • Monitoring & Alerts

    • Real-time backup status
    • Storage usage tracking
    • Email/webhook notifications
    • Audit logging
  • User Management

    • Role-based access control
    • Multi-user support
    • Activity tracking

πŸ“¦ Project Structure

rukhalt/
β”œβ”€β”€ server/              # Backend API (Go)
β”‚   β”œβ”€β”€ cmd/            # CLI commands
β”‚   β”œβ”€β”€ internal/       # Internal packages
β”‚   β”œβ”€β”€ migrations/     # Database migrations
β”‚   β”œβ”€β”€ Dockerfile      # Server Docker image
β”‚   └── docker-compose.yml
β”‚
β”œβ”€β”€ client/             # Frontend UI (React + TypeScript)
β”‚   β”œβ”€β”€ src/           # Source code
β”‚   β”œβ”€β”€ public/        # Static assets
β”‚   └── Dockerfile     # Client Docker image
β”‚
β”œβ”€β”€ docker-compose.yml  # Full stack compose
└── README.md          # This file

πŸ› οΈ Tech Stack

Server

  • Language: Go 1.23
  • Framework: Gin
  • Database: PostgreSQL 15
  • ORM: GORM
  • Migrations: Goose
  • CLI: Cobra
  • Cache: Redis

Client

  • Framework: React 18
  • Language: TypeScript
  • Build Tool: Vite
  • Styling: Tailwind CSS
  • HTTP Client: Axios

πŸš€ Quick Start

Prerequisites

  • Docker & Docker Compose
  • Go 1.23+ (for local server development)
  • Node.js 18+ (for local client development)

Full Stack Development

  1. Clone the repository:
git clone <repository-url>
cd rukhalt
  1. Start the full stack:
docker compose up -d

This will start:

  • PostgreSQL database (port 5432)
  • Redis cache (port 6379)
  • Backend API (port 8080)
  • Frontend UI (port 3000)
  1. Access the application:

Server Development

See server/README.md for detailed server setup and development instructions.

cd server
make dev

Client Development

See client/README.md for detailed client setup and development instructions.

cd client
npm install
npm run dev

πŸ“š Documentation

πŸ”§ Configuration

Environment Variables

Server (.env)

DB_HOST=localhost
DB_PORT=5432
DB_NAME=rukhalt_db
DB_USER=rukhalt_user
DB_PASSWORD=rukhalt_password
JWT_SECRET=your-secret-key
ENCRYPTION_KEY=your-encryption-key
PORT=8080

Client (.env.local)

VITE_API_URL=http://localhost:8080/api/v1

🐳 Docker Images

Building Images

# Build server image
docker build -t rukhalt-server:latest ./server

# Build client image
docker build -t rukhalt-client:latest ./client

Production Deployment

docker compose -f docker-compose.prod.yml up -d

πŸ“Š Database Migrations

Migrations are managed using Goose:

cd server

# Run migrations
make migrate-up

# Create new migration
make migrate-create NAME=add_feature

# Check migration status
make migrate-status

πŸ§ͺ Testing

Server Tests

cd server
make test

Client Tests

cd client
npm test

πŸ” Security

  • JWT-based authentication
  • Password hashing with bcrypt
  • Encrypted storage of sensitive credentials
  • HTTPS support
  • CORS configuration
  • SQL injection protection via ORM

πŸ“ API Endpoints

Authentication

  • POST /api/v1/auth/login - User login
  • POST /api/v1/auth/register - User registration
  • POST /api/v1/auth/refresh - Refresh token

Backups

  • GET /api/v1/backups - List backups
  • POST /api/v1/backups - Create backup
  • DELETE /api/v1/backups/:id - Delete backup
  • POST /api/v1/backups/restore - Restore backup

Instances

  • GET /api/v1/postgres/instances - List PostgreSQL instances
  • GET /api/v1/vps/instances - List VPS instances
  • GET /api/v1/rustfs/instances - List object storage instances

See API Documentation for complete endpoint list.

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

πŸ“„ License

MIT License - see LICENSE file for details

πŸ™ Acknowledgments

  • Inspired by modern backup solutions
  • Built with best practices from the Go and React communities

πŸ“ž Support

For issues and questions:

πŸ—ΊοΈ Roadmap

  • Multi-region backup support
  • Backup verification and integrity checks
  • Advanced scheduling options
  • Backup analytics and reporting
  • Mobile app
  • Kubernetes operator
  • Terraform provider

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors