UnderHost
Knowledgebase Docs

aaPanel Backup and Restore: Save and Recover Data

Backup and restore websites in aaPanel. Full backups, incremental backups, FTP transfer, remote storage, automated scheduling, disaster recovery.

On this page

Data loss is the worst disaster: ransomware, server failure, accidental deletion, or hacks. Regular backups are your insurance policy. aaPanel makes backup and restore simple: one-click backups, remote storage integration, scheduling, and restoration. A good backup strategy means you can recover in hours, not days.

Backup Importance

Scenarios where backups save you:

  • Server crash: Hard drive fails → restore from backup → back online in hours
  • Ransomware: Files encrypted → restore clean backup → business continues
  • Accidental deletion: Dev deletes production database → restore from yesterday's backup
  • Hacking: Attacker modifies files → restore from pre-hack backup
  • Update failure: Plugin update breaks site → restore previous version

Backup rule of thumb: "3-2-1" - 3 copies, 2 different media, 1 off-site

Backup Types in aaPanel

TypeSizeSpeedUse Case
Full Backup10GB website = 10GB backupSlow (30 min)Weekly complete snapshots
IncrementalChanges only (~100MB)Fast (2 min)Daily, only changed files
Website OnlyHTML, CSS, images onlyFast (5 min)Code recovery
Database OnlyDatabase size onlyFast (5 min)Data recovery

Create Local Backup

Manual backup (one-time):

  1. aaPanel → Backups → Click "Create Backup"
  2. Select what to backup:
    • Website files (public_html)
    • Database (MySQL)
    • SSL certificates
  3. Click "Start Backup"
  4. Wait for completion (size determines time)
  5. Backup saved to /www/wwwroot/backup/ (or configured location)

Check backup file:

ls -lh /www/wwwroot/backup/
# Shows backup size and date

Remote Storage Backup

Why backup to remote storage:

  • VPS dies → all local backups are gone
  • Ransomware deletes backups → remote copy is safe
  • Automatic sync → backup even if you forget

aaPanel supports:

  • Amazon S3 (~$0.023/GB/month)
  • Backblaze B2 (cheaper, ~$0.006/GB/month)
  • Aliyun OSS
  • Qiniu Cloud Storage
  • FTP server (your own server)

Setup S3 backup:

  1. Create AWS account and S3 bucket
  2. aaPanel → Backups → Remote Storage
  3. Provider: Amazon S3
  4. Access Key & Secret Key from AWS
  5. Bucket Name: your-backup-bucket
  6. Test connection (button at bottom)
  7. Enable auto-sync

Transfer via FTP

Manual FTP backup (without remote storage integration):

# SSH into your VPS
sftp youruser@yourserver.com
# Navigate to backup directory
cd /www/wwwroot/backup/
# Download backup to local machine
get website-backup-2026-06-06.tar.gz

Using FTP client (FileZilla):

  1. Download FileZilla (free)
  2. File → Site Manager → New Site
  3. Host: your-vps-ip
  4. Username: root (or user)
  5. Password: SSH password
  6. Protocol: SFTP
  7. Connect → Navigate to backup folder
  8. Download backup files to local machine

Restore from Backup

Restore website (same VPS):

  1. aaPanel → Backups → Backup List
  2. Click "Restore" on desired backup
  3. Select what to restore:
    • Website files
    • Database
    • Or both
  4. Click "Restore"
  5. Wait for completion (can take 10-30 minutes)
  6. Website reverted to backup date/time

Restore to different VPS:

  1. Download backup from remote storage (S3, etc.)
  2. Upload to new VPS /www/wwwroot/backup/
  3. aaPanel → Backups → Restore
  4. Select backup and restore

Restore specific database:

# List databases
mysql -u root -p -e "SHOW DATABASES;"

# Restore from backup SQL file
mysql -u root -p database_name < backup.sql

Automate Backups

Schedule daily automatic backups:

  1. aaPanel → Backups → Settings
  2. Enable "Automatic Backup"
  3. Set frequency:
    • Daily at 2:00 AM (recommended)
    • Weekly (Friday night)
    • Monthly (1st of month)
  4. Set backup type: Full or Incremental
  5. Enable "Auto Upload to Remote Storage"
  6. Save settings

Recommended schedule:

Daily incremental backup: 2:00 AM (keeps 7 days)
Weekly full backup: Friday 3:00 AM (keeps 4 weeks)
Monthly full backup: 1st of month (keeps 12 months)

Troubleshooting

Backup failed / not running:

  • Check disk space: df -h (backup needs 50% free)
  • Check backup logs: aaPanel → Backups → Logs
  • Manually trigger: aaPanel → Backups → Create Backup

S3 upload not working:

  • Verify AWS credentials are correct
  • Test connection: aaPanel → Remote Storage → Test
  • Check bucket exists and is writable
  • Check IAM user permissions (should have S3 full access)

Restore failed:

  • Ensure backup file is complete and not corrupted
  • Check disk space on target VPS
  • Verify database and website paths match
  • Try restoring to different location first

Backup too large / slow:

  • Use incremental backups instead of full
  • Exclude large log files or archives
  • Schedule backups during off-peak hours
Test restore quarterly—backups only work if they can be restored

A backup that can't be restored is worse than no backup. Schedule quarterly test restores on staging VPS to verify backups are reliable.

Related: Backup strategy | aaPanel setup | Backup verification | Disaster recovery

Was this article helpful?

Need aaPanel hosting?

Install aaPanel on an UnderHost VPS or dedicated server when you want a simple web interface for sites, databases, SSL, and apps.

Related articles

Back to aaPanel