Skip to content

PAzter1101/restic-manager

Repository files navigation

Restic Manager

Tests Code Quality CodeFactor codecov semantic-release: angular GitHub release (latest by date) GitHub Release Date License: MIT Python 3.10+ React 18 TypeScript

πŸ‡·πŸ‡Ί Русская вСрсия

Modern web interface for viewing and downloading backups from restic repository. Built with FastAPI backend and React frontend.

πŸš€ Features

  • πŸ” User authentication via JWT tokens
  • πŸ“Έ View snapshots list with pagination
  • πŸ” Advanced filtering by hosts and tags
  • ⬇️ Download files from snapshots via browser
  • πŸ“ Interactive file browser for snapshots
  • ℹ️ Detailed snapshot information and statistics
  • πŸ“± Responsive React-based web interface
  • πŸš€ Modern SPA architecture
  • πŸ“Š Real-time snapshot size loading
  • 🎨 Clean and intuitive UI/UX

πŸ—οΈ Architecture

  • Backend: FastAPI (Python 3.10+) with modular structure
  • Frontend: React 18 + TypeScript + Vite
  • Testing: pytest (backend) + Vitest + React Testing Library (frontend)
  • Code Quality: Black, isort, flake8, mypy, ESLint
  • CI/CD: GitHub Actions with automated testing and releases
  • Containerization: Multi-stage Docker builds

Requirements

  • Docker & Docker Compose
  • Access to S3 storage with restic repository
  • Modern web browser with JavaScript enabled

Installation

Option 1: Ready Docker Image

  1. Create .env file with settings:

    cp .env.example .env

    Edit .env:

    RESTIC_REPOSITORY=s3:https://s3.example.com/your-backup-bucket
    RESTIC_PASSWORD=your_restic_password
    AWS_ACCESS_KEY_ID=your_access_key
    AWS_SECRET_ACCESS_KEY=your_secret_key
    SECRET_KEY=random_string_for_jwt
    ADMIN_USERNAME=admin
    ADMIN_PASSWORD=your_admin_password
    
  2. Run container: From GitHub Container Registry

    docker run -d -p 8000:8000 --env-file .env ghcr.io/pazter1101/restic-manager:latest

    Or from Docker Hub

    docker run -d -p 8000:8000 --env-file .env pazter1101/restic-manager:latest
  3. Open http://localhost:8000 in browser

Option 2: Build from Source

  1. Copy .env.example to .env and configure variables:

    cp .env.example .env
  2. Run application:

    docker compose up -d

Usage

  1. Login using credentials from .env
  2. Browse snapshots list
  3. Filter by hosts and tags
  4. Click on file to download

Testing

Backend Tests

pip install -r requirements-test.txt
cd app && python -m pytest ../tests/ -v

Frontend Tests

cd frontend
npm ci
npm test -- --run

Code Quality

# Python
black --check .
isort --check-only .
flake8 .
mypy --ignore-missing-imports app/

# TypeScript
cd frontend
npm run lint
npx tsc --noEmit

API

  • GET / - serve React SPA
  • POST /api/login - user authentication
  • GET /api/snapshots - get snapshots list with pagination and filtering
  • GET /api/snapshot/{snapshot_id}/size - get snapshot size
  • GET /api/snapshots/{snapshot_id}/files - get files in snapshot
  • POST /api/upload - upload files and create backup
  • GET /api/download/{snapshot_id} - download files from snapshot

🀝 Contributing

Read CONTRIBUTING.md for information on how to contribute to the project.

πŸ“„ License

This project is licensed under MIT License - see LICENSE file for details.

πŸ™ Acknowledgments

  • Restic - for excellent backup tool
  • FastAPI - for modern web framework
  • All contributors who help improve the project

test

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •