Skip to content

πŸ’Ύ A modern backup scheduling application with support for various backup targets including local directories, SFTP, SMB, Dropbox, and Google Drive

Notifications You must be signed in to change notification settings

BangerTech/BackupPro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BackupPro

Docker React NodeJS TypeScript PostgreSQL License

BackupPro Logo

πŸ’Ύ A modern backup scheduling application with support for various backup targets including local directories, SFTP, SMB, Dropbox, and Google Drive

Usage

BackupPro Demo

Screenshots

Left to right: Dashboard, Create Schedule, Backup Targets

Table of Contents

What is BackupPro?

BackupPro is a comprehensive backup scheduling solution designed to simplify the process of creating, managing, and monitoring backups across various storage targets. With an intuitive web interface, it allows users to set up automated backup schedules, track backup status, and ensure data safety with minimal effort.

Features

  • πŸ“… Flexible Scheduling: Create backup schedules with customizable days and times
  • 🎯 Multiple Backup Targets: Support for local directories, SFTP, SMB, Dropbox, and Google Drive
  • πŸ“Š Dashboard Overview: Monitor backup status, storage usage, and success rates at a glance
  • πŸ”” Status Notifications: Get informed about backup successes and failures
  • πŸ”„ Manual Backups: Trigger immediate backups when needed
  • πŸ“ File Explorer: Browse your file system to select backup sources
  • 🌐 Cloud Integration: Connect to popular cloud storage services
  • πŸ”’ Secure Connections: SFTP support with password or key-based authentication
  • πŸŒ™ Dark Mode: Eye-friendly interface for day and night use
  • πŸ” Detailed Logs: Track all backup activities with comprehensive logs

Installation

Prerequisites

  • Docker and Docker Compose
  • Node.js (for development)
  • Supported platforms:
    • x86/AMD64 (standard PCs and servers)
    • ARM64 (Raspberry Pi 4 or newer with 64-bit OS)

Quick Start with Docker

  1. Clone the repository:

    git clone https://github.com/yourusername/BackupPro.git
    cd BackupPro
  2. Configure the application:

    cp .env.example .env
    # Edit the .env file to match your environment
  3. Start the Docker containers:

    docker-compose up -d
  4. Access the application at http://localhost:3000

Quick Start with Docker Hub Images

You can also use pre-built Docker images from Docker Hub:

  1. Download the Docker Compose file:

    curl -O https://raw.githubusercontent.com/bangertech/backup-pro/master/docker-compose.yml
  2. Create a .env file with your settings:

    cat > .env << 'EOL'
    # Timezone settings
    TZ=Europe/Berlin
    
    # Ports for the different services
    FRONTEND_PORT=3000
    BACKEND_PORT=4000
    POSTGRES_PORT=5432
    
    # Database settings
    POSTGRES_USER=postgres
    POSTGRES_PASSWORD=postgres
    POSTGRES_DB=backup_schedule
    
    # Application settings
    NODE_ENV=production
    FILE_EXPLORER_BASE_DIR=/host_fs
    EOL
  3. Start the application:

    docker compose up -d
  4. Access the application at http://localhost:3000

Development with Docker

For development purposes, you can use the development Docker Compose configuration:

docker compose -f docker-compose.dev.yml up

This will build the images locally instead of using the pre-built ones from Docker Hub.

Updating Docker Hub Images

To update to the latest version when using Docker Hub images:

docker compose pull
docker compose up -d

Configuration

BackupPro can be configured using environment variables in the .env file:

# Timezone settings
# Set your desired timezone here
TZ=Europe/Berlin

# Network settings
# Set your local IP address or hostname here
HOST_IP=192.168.2.86
# Ports for the different services
FRONTEND_PORT=3000
BACKEND_PORT=4000
POSTGRES_PORT=5432

# Database settings
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=backup_schedule

# Application settings
NODE_ENV=production
FILE_EXPLORER_BASE_DIR=/host_fs

Timezone Configuration

The timezone setting (TZ) is used across all components (frontend, backend, and PostgreSQL) to ensure consistent time display and scheduling. Examples of valid timezones:

  • Europe/Berlin (Germany)
  • Europe/London (UK)
  • America/New_York (US Eastern)
  • America/Los_Angeles (US Pacific)
  • Asia/Tokyo (Japan)

For a complete list of timezones, see this reference.

OAuth Configuration for Cloud Services

When adding cloud storage targets like Dropbox or Google Drive:

  1. Navigate to "Targets" and click "Create New Target"
  2. Select the target type (e.g., Dropbox or Google Drive)
  3. Enter the required OAuth credentials (Client ID and Secret)
  4. These credentials are securely stored in the database for future operations

Usage

Creating Backup Targets

  1. Navigate to the "Targets" section
  2. Click "Create New Target"
  3. Select the target type (Local, SFTP, Dropbox, Google Drive)
  4. Fill in the required information:
    • For local targets: Path to the backup destination
    • For SFTP: Server details, credentials, and path
    • For cloud services: Connect via OAuth

Setting Up Backup Schedules

  1. Go to the "Schedules" section
  2. Click "Create Schedule"
  3. Configure your schedule:
    • Name your backup schedule
    • Select the source directory to back up
    • Choose a backup target
    • Set the schedule (days of week and time)
    • Enable/disable the schedule as needed

Monitoring Backups

The Dashboard provides an overview of:

  • Total backups performed
  • Active schedules
  • Storage usage
  • Success rate
  • Recent backup status

Click on any metric for detailed information.

Troubleshooting

Common Issues

Backup fails with "Permission denied"

  • Check that the application has read access to the source directory
  • Verify write permissions on the target location

Schedule not running at the expected time

  • Confirm the timezone setting in your .env file
  • Check that the schedule is marked as "Active"
  • Verify the server time with docker-compose exec backend date

Cannot connect to cloud services

  • Ensure your OAuth credentials are correct
  • Check your internet connection
  • Verify that the service APIs are accessible from your server

Logs

To view application logs:

# Backend logs
docker-compose logs backend

# Frontend logs
docker-compose logs frontend

# Database logs
docker-compose logs postgres

Development

Setting Up Development Environment

  1. Clone the repository:

    git clone https://github.com/yourusername/BackupPro.git
    cd BackupPro
  2. Install dependencies:

    # Frontend
    cd frontend
    npm install
    
    # Backend
    cd ../backend
    npm install
  3. Start development servers:

    # Frontend
    cd frontend
    npm run dev
    
    # Backend
    cd ../backend
    npm run dev

GitHub Actions for Docker Hub

This project includes a GitHub Actions workflow that automatically builds and pushes Docker images to Docker Hub when changes are pushed to the master branch. To set up this workflow:

  1. Create a Docker Hub account and repository named bangertech/backup-pro
  2. In your GitHub repository, add the following secrets:
    • DOCKERHUB_USERNAME: Your Docker Hub username
    • DOCKERHUB_TOKEN: A Docker Hub access token with read/write permissions

The workflow will:

  • Build multi-architecture images (AMD64 and ARM64)
  • Push them to Docker Hub with appropriate tags
  • Create a production-ready Docker Compose file

You can also manually trigger the workflow from the Actions tab in your GitHub repository.

Project Structure

  • /frontend - React.js frontend application
  • /backend - Node.js backend API
  • /db - Database migrations and seeds

License

MIT

Keywords

backup scheduler automation data-protection cloud-backup sftp dropbox google-drive docker react node.js typescript postgresql backup-management web-interface

About

πŸ’Ύ A modern backup scheduling application with support for various backup targets including local directories, SFTP, SMB, Dropbox, and Google Drive

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages