Skip to content

Backup and Restore

This guide explains how to back up and restore Quizzical Beats data, ensuring your music quiz system remains protected against data loss.

Understanding Backup Components

A complete Quizzical Beats backup includes:

  • Database: Contains all rounds, songs, user accounts, and system settings
  • Media Files: MP3 snippets, custom intro/outro sounds, and uploaded audio
  • Configuration: Environment variables and application settings
  • Metadata: Version information and backup manifest

Manual Backup Process

Perform a manual backup through the admin interface:

  1. Log in as an administrator
  2. Navigate to Admin > System > Backup Manager
  3. Click "Create New Backup" or use the "Quick Actions" button
  4. Options you can configure:
  5. Custom backup name (optional)
  6. Include MP3 files (enabled by default)
  7. Include configuration files (enabled by default)
  8. The backup will be stored in the /data/backups directory
  9. Once completed, you can download the backup ZIP file

Automated Backup Configuration

Set up scheduled automatic backups:

  1. Go to Admin > System > Backup Manager
  2. Click "Schedule Backups"
  3. Configure:
  4. Frequency (hourly, daily, weekly)
  5. Time of execution (HH:MM format)
  6. Retention policy (days to keep backups)
  7. Click "Save Schedule" to apply the settings

For Docker deployments, you can configure automated backups using the Docker labels or Ofelia scheduler:

  1. Click "View Configuration Suggestion" in the scheduler form
  2. Choose the appropriate configuration option:
  3. Docker Compose labels
  4. Ofelia.ini configuration
  5. Apply the suggested configuration to your Docker setup
  6. Restart your containers to activate the schedule

Backup Retention Policies

Configure how long backups are kept:

  1. Navigate to Admin > System > Backup Manager
  2. Click "Configure Retention"
  3. Set the number of days to keep backups:
  4. Enter a value between 1-365 days
  5. Enter 0 to keep all backups indefinitely
  6. Options:
  7. Save Policy: Updates the retention settings
  8. Apply Now: Immediately deletes backups older than the specified period

Backup Management

Manage your existing backups:

  1. Go to Admin > System > Backup Manager > Existing Backups
  2. For each backup, you can:
  3. Download: Save the backup file to your local system
  4. Verify: Check the backup integrity
  5. Restore: Revert your system to this backup state
  6. Delete: Remove the backup file

Restoring from Backup

Restore your system when needed:

  1. Go to Admin > System > Backup Manager > Existing Backups
  2. You can either:
  3. Select an existing backup from the list
  4. Upload a backup file using the "Upload Backup" button
  5. Click the "Restore" icon next to the backup you wish to restore
  6. Confirm the restore operation
  7. The system will:
  8. Create safety backups of your current state
  9. Restore the database, MP3 files, and configuration
  10. Preserve all file history

Command-Line Backup

For scripting and automation, use the CLI commands:

# Create a backup
python run.py backup create --auto

# Apply retention policy
python run.py backup retention --days 30

Backup Verification

Ensure your backups are valid:

  1. Go to Admin > System > Backup Manager > Existing Backups
  2. Click the "Verify" icon next to the backup
  3. The system will check:
  4. File integrity (ZIP structure)
  5. Required files presence (database)
  6. Version metadata
  7. A notification will appear with the verification results

System Health

The Backup Manager also provides a system health overview:

  1. Check the "System Health" section at the bottom of the page
  2. It displays the status of critical components:
  3. Database connectivity
  4. File storage access
  5. Configuration status

Troubleshooting Backup Issues

Backup Failure: - Check storage permissions for the /data/backups directory - Verify sufficient disk space - Ensure the database is not locked by another process

Restore Failure: - Ensure the backup format is compatible with your version - Check system logs for detailed error messages - Verify backup file integrity using the verification tool