PanelAlpha Documentation
Back Home
Live Demo Get Started

PanelAlpha Snapshot Tool

Documentation
    Introduction
Getting Started
    Installation Guide Update Guide SSL Configuration Translations
System Configuration
    General Configuration Plans Hosting Servers DNS Servers Email Servers Remote Backups Notifications Automatic SSL Plugins & Themes Background Billing Diagnostic Mode Automatic Tester Snapshot Tool
Admin Area
    Dashboard Instances Services Users Logs Migrations
Onboarding Methods
    Quick Onboarding Super Quick Onboarding Standard Onboarding
Hosting Servers
    Hosting Scenarios PanelAlpha Engine cPanel Plesk DirectAdmin WP Cloud
DNS Servers
    Cloudflare cPanel DNS Only PowerDNS
Email Servers
    Mailcow cPanel
Billing Systems Integrations
    PanelAlpha WordPress Hosting For WHMCS
Integrations
    Atarim AWStats Matomo Google Analytics Let's Encrypt Google PageSpeed Insights DB-IP Extendify WithoutDNS
Client Area - Instances
    List of Instances Creating New Instance Importing Existing Instance Instance Details Changing Domain Sharing Instances Monitoring Backups Plugins Advanced Settings
Client Area - Hosting
    Summary Domains FTP Accounts MySQL Databases Cron Jobs File Manager DNS Zone Editor Email Addresses Email Forwarders

# PanelAlpha Snapshot Tool

  • Overview
  • What Gets Backed Up
    • Databases
    • Docker Volumes
    • Configuration Files
  • Installation
  • Initial Configuration
    • Storage Options
  • Basic Operations
    • Creating Snapshots
    • Listing Snapshots
    • Testing Connection
  • Backup Restoration
    • Same Server Restoration
    • Migration to New Server
  • Automated Backups
    • Enable Automation
    • Check Status
    • Disable Automation
  • Configuration File
  • Backup Management
    • Delete Old Backups
    • Check Disk Usage
  • Security Features
  • Monitoring and Logs
    • Log Files
    • Automatic Backup Monitoring
  • Troubleshooting
    • Common Issues
    • Getting Help

PanelAlpha Snapshot Tool is a professional command-line utility for creating secure, encrypted backups (snapshots) of complete PanelAlpha installations. The tool enables comprehensive backup management, automated scheduling, and reliable system restoration.

# Overview

The Snapshot Tool allows you to:

  • Create complete backups of PanelAlpha (databases, files, configuration)
  • Automatically create backups at scheduled times
  • Restore the system on the same or new server
  • Securely store backups in the cloud or locally

# What Gets Backed Up

# Databases

  • PanelAlpha API Database: Complete MySQL dump with routines and triggers

# Docker Volumes

  • api-storage: PanelAlpha application data
  • database-api-data: MySQL data files
  • redis-data: Redis cache and session data

# Configuration Files

  • docker-compose.yml: Container orchestration configuration
  • .env files: Environment variables and secrets
  • packages/: Custom packages and extensions
  • SSL certificates: Let's Encrypt certificates
  • Nginx configurations: Web server settings

# Installation

Download and install the snapshot tool on your PanelAlpha server:

# Download the tool
wget https://raw.githubusercontent.com/panelalpha/PanelAlpha-Snapshot-Tool/refs/heads/main/panelalpha-snapshot.sh

# Make it executable
chmod +x panelalpha-snapshot.sh

# Install required dependencies
sudo ./panelalpha-snapshot.sh --install

# Initial Configuration

Configure the backup storage location by running the setup wizard:

sudo ./panelalpha-snapshot.sh --setup

The setup wizard will guide you through configuring:

  • Storage backend type (local, S3, SFTP)
  • Connection credentials
  • Encryption password
  • Backup retention settings

# Storage Options

# Local Storage

  • Best for: Development, testing, quick local backups
  • Repository format: local:/backup/panelalpha-snapshots
  • Pros: Fast, simple setup
  • Cons: Single point of failure

# SFTP Storage

  • Best for: Remote server backups, existing SSH infrastructure
  • Repository format: sftp:backup-user@backup.example.com:/backups/panelalpha
  • Pros: Secure, widely supported
  • Requires: SSH access to remote server

# S3-Compatible Storage

  • Best for: Production environments, scalable storage
  • Repository format: s3:s3.eu-west-1.amazonaws.com/my-bucket/panelalpha-snapshots
  • Supports: AWS S3, Hetzner Storage, MinIO, DigitalOcean Spaces
  • Pros: Highly available, scalable, cost-effective

# Basic Operations

# Creating Snapshots

Create a manual backup:

sudo ./panelalpha-snapshot.sh --snapshot

# Listing Snapshots

View all available backups:

sudo ./panelalpha-snapshot.sh --list-snapshots

# Testing Connection

Verify repository connectivity:

sudo ./panelalpha-snapshot.sh --test-connection

# Backup Restoration

# Same Server Restoration

If you need to restore PanelAlpha to a previous state on the same server:

  1. List available backups:

    sudo ./panelalpha-snapshot.sh --list-snapshots
    
  2. Restore from specific backup:

    sudo ./panelalpha-snapshot.sh --restore a1b2c3d4
    
  3. Restore from latest backup:

    sudo ./panelalpha-snapshot.sh --restore latest
    

Note: Restoration will replace all current data! Ensure you have recent backups before proceeding.

# Migration to New Server

To migrate PanelAlpha to a new server:

On the source server:

  1. Create a final backup:
    sudo ./panelalpha-snapshot.sh --snapshot
    
  2. Note the backup ID from the command output

On the target server:

  1. Install PanelAlpha (basic installation only)
  2. Copy and install the snapshot tool:
    sudo ./panelalpha-snapshot.sh --install
    
  3. Configure repository (use same settings as source server):
    sudo ./panelalpha-snapshot.sh --setup
    
  4. Test connection:
    sudo ./panelalpha-snapshot.sh --test-connection
    
  5. Restore from backup:
    sudo ./panelalpha-snapshot.sh --restore a1b2c3d4
    

The restore process automatically:

  • Updates database connection settings
  • Adjusts server IP addresses in system settings
  • Configures trusted hosts
  • Recreates Docker volumes
  • Restores SSL certificates

# Automated Backups

# Enable Automation

Install automatic daily backups:

sudo ./panelalpha-snapshot.sh --cron install

# Check Status

Monitor automation status:

sudo ./panelalpha-snapshot.sh --cron status

# Disable Automation

Remove automatic backups:

sudo ./panelalpha-snapshot.sh --cron remove

# Configuration File

Advanced configuration is stored in /opt/panelalpha/app/.env-backup:

# Repository settings
RESTIC_REPOSITORY="s3:s3.eu-west-1.amazonaws.com/my-bucket/panelalpha-snapshots"
RESTIC_PASSWORD="your-encryption-password"

# S3 credentials (if applicable)
AWS_ACCESS_KEY_ID="your-access-key"
AWS_SECRET_ACCESS_KEY="your-secret-key"

# Snapshot settings
BACKUP_RETENTION_DAYS=30
BACKUP_HOUR=2
BACKUP_TAG_PREFIX="panelalpha"

# System paths
LOG_FILE="/var/log/panelalpha-snapshot.log"
BACKUP_TEMP_DIR="/var/tmp"
RESTIC_CACHE_DIR="/var/cache/restic"

# Backup Management

# Delete Old Backups

Remove specific snapshots to free up storage space:

sudo ./panelalpha-snapshot.sh --delete-snapshots a1b2c3d4

# Check Disk Usage

Monitor storage consumption:

# Check available disk space
df -h

# Check backup repository size
sudo ./panelalpha-snapshot.sh --repository-stats

# Security Features

The Snapshot Tool implements enterprise-grade security:

  • ✅ Encryption: All snapshots are encrypted using AES-256
  • ✅ Access Control: Configuration files have restricted permissions (600)
  • ✅ Credential Management: Cloud credentials are only exported during operations
  • ✅ Network Security: HTTPS/TLS for all remote communications

# Monitoring and Logs

# Log Files

Monitor backup operations in /var/log/panelalpha-snapshot.log:

# View recent activity
sudo tail -f /var/log/panelalpha-snapshot.log

# Search for errors
sudo grep ERROR /var/log/panelalpha-snapshot.log

# Automatic Backup Monitoring

Check the status of scheduled backups:

sudo ./panelalpha-snapshot.sh --cron status

# Troubleshooting

# Common Issues

Permission Denied

# Ensure running with sudo
sudo ./panelalpha-snapshot.sh --snapshot

Docker Not Running

sudo systemctl start docker
sudo systemctl enable docker

Repository Connection Failed

# Test connection
sudo ./panelalpha-snapshot.sh --test-connection

# Verify credentials
sudo nano /opt/panelalpha/app/.env-backup

Insufficient Disk Space

# Check available space
df -h /var/tmp

# Clean up old snapshots
sudo ./panelalpha-snapshot.sh --delete-snapshots old-snapshot-id

Database Connection Errors

  1. Verify PanelAlpha is running: docker compose ps
  2. Check database passwords in .env file
  3. Review logs: sudo tail -f /var/log/panelalpha-snapshot.log

# Getting Help

If you encounter issues:

  1. Check logs for specific error messages
  2. Run connection test to validate repository access
  3. Contact PanelAlpha support