Skip to content

Automated Backups

The Lumo Server includes a comprehensive automated backup system with compression, retention policies, and multiple destination support.

  • Automated Daily Backups: Runs on configurable schedule (default: every 24 hours)
  • Compression: gzip, bzip2, or xz compression
  • Retention Policy: Keep 7 daily + 4 weekly backups by default
  • Multiple Destinations: Local storage, S3-compatible, rclone
  • Safe Backups: Automatically disables world saving during backup
  • Discord Notifications: Optional notifications for backup events
  • Easy Restore: Simple restore script included

Backups are enabled by default. Configure with volume mount:

Terminal window
docker run \
-v minecraft_data:/data \
-v minecraft_backups:/backups \
ghcr.io/lucasilverentand/lumo-server:latest

Backups will be stored in the /backups volume.

Trigger a manual backup:

Terminal window
docker exec <container> python3 /backup.py
  1. Stop the server:

    Terminal window
    docker stop <container>
  2. List available backups:

    Terminal window
    docker run --rm -v minecraft_backups:/backups ghcr.io/lucasilverentand/lumo-server:latest ls -lh /backups
  3. Restore from backup:

    Terminal window
    docker run --rm \
    -v minecraft_data:/data \
    -v minecraft_backups:/backups \
    ghcr.io/lucasilverentand/lumo-server:latest /restore.sh <backup-filename>
  4. Start the server:

    Terminal window
    docker start <container>

Configure backups via environment variables:

VariableDefaultDescription
BACKUP_ENABLEDtrueEnable/disable automated backups
BACKUP_INTERVAL86400Backup interval in seconds (24h)
BACKUP_DIR/backupsDirectory to store backups
BACKUP_RETENTION_DAYS7Keep backups from last N days
BACKUP_RETENTION_WEEKS4Keep one weekly backup for N weeks
BACKUP_COMPRESSIONgzCompression: gz, bz2, or xz
  • gz (gzip): Fast compression, moderate size (recommended)
  • bz2 (bzip2): Slower compression, smaller size
  • xz: Slowest compression, smallest size

Example: 12-hour backups with 14-day retention

Section titled “Example: 12-hour backups with 14-day retention”
Terminal window
docker run \
-e BACKUP_INTERVAL=43200 \
-e BACKUP_RETENTION_DAYS=14 \
-e BACKUP_RETENTION_WEEKS=8 \
-v minecraft_backups:/backups \
ghcr.io/lucasilverentand/lumo-server:latest

Upload backups to S3, MinIO, Backblaze B2, or other S3-compatible services.

VariableDefaultDescription
S3_ENABLEDfalseEnable S3 uploads
S3_BUCKET""S3 bucket name
S3_PREFIXminecraft-backupsS3 object prefix/folder
S3_ENDPOINT""Custom endpoint (for MinIO, B2, etc.)
Terminal window
docker run \
-e S3_ENABLED=true \
-e S3_BUCKET=my-minecraft-backups \
-e AWS_ACCESS_KEY_ID=AKIA... \
-e AWS_SECRET_ACCESS_KEY=... \
-e AWS_DEFAULT_REGION=us-east-1 \
ghcr.io/lucasilverentand/lumo-server:latest
Terminal window
docker run \
-e S3_ENABLED=true \
-e S3_BUCKET=minecraft \
-e S3_ENDPOINT=https://minio.example.com \
-e AWS_ACCESS_KEY_ID=minioadmin \
-e AWS_SECRET_ACCESS_KEY=minioadmin \
ghcr.io/lucasilverentand/lumo-server:latest
Terminal window
docker run \
-e S3_ENABLED=true \
-e S3_BUCKET=my-bucket \
-e S3_ENDPOINT=https://s3.us-west-002.backblazeb2.com \
-e AWS_ACCESS_KEY_ID=<key_id> \
-e AWS_SECRET_ACCESS_KEY=<application_key> \
ghcr.io/lucasilverentand/lumo-server:latest

Use rclone to backup to 50+ cloud storage providers.

  1. Configure rclone on your host:

    Terminal window
    rclone config
  2. Mount rclone config into container:

    Terminal window
    docker run \
    -e RCLONE_ENABLED=true \
    -e RCLONE_DEST="remote:bucket/minecraft" \
    -v ~/.config/rclone:/root/.config/rclone:ro \
    ghcr.io/lucasilverentand/lumo-server:latest

Rclone supports 50+ providers including:

  • Google Drive
  • Dropbox
  • OneDrive
  • SFTP
  • FTP
  • WebDAV
  • And many more

See rclone.org for full list.

Receive backup status notifications in Discord.

  1. Create Discord webhook:

    • Server Settings → Integrations → Webhooks → New Webhook
    • Copy webhook URL
  2. Configure:

    Terminal window
    docker run \
    -e DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/..." \
    ghcr.io/lucasilverentand/lumo-server:latest
  • Backup Success: Backup completed with filename and size
  • Backup Failed: Backup failed with error message

The backup includes:

  • All world data (overworld, nether, end)
  • Player data (inventories, locations, stats)
  • Plugin configurations
  • Plugin data (economy, permissions, etc.)
  • Server properties

The backup excludes:

  • Log files
  • Temporary files
  • Cache directories
  • Session locks

Complete server restoration from backup:

  1. Stop the server (REQUIRED):

    Terminal window
    docker stop minecraft-server
  2. Run restore script:

    Terminal window
    docker run --rm -it \
    -v minecraft_data:/data \
    -v minecraft_backups:/backups \
    ghcr.io/lucasilverentand/lumo-server:latest /restore.sh minecraft-backup-20251219_120000.tar.gz
  3. Confirm restore:

    • Script will ask for confirmation
    • Creates safety backup of current data
    • Extracts backup archive
    • Fixes permissions
  4. Start server:

    Terminal window
    docker start minecraft-server

Restore specific files or worlds:

  1. Extract backup to temporary location:

    Terminal window
    mkdir /tmp/backup-extract
    tar -xzf minecraft-backup-20251219_120000.tar.gz -C /tmp/backup-extract
  2. Copy specific files:

    Terminal window
    # Restore just one world
    docker cp /tmp/backup-extract/data/world minecraft-server:/data/
    # Restore player data
    docker cp /tmp/backup-extract/data/world/playerdata minecraft-server:/data/world/
  3. Fix permissions and restart:

    Terminal window
    docker exec minecraft-server chown -R minecraft:minecraft /data
    docker restart minecraft-server
Terminal window
docker logs minecraft-server | grep BACKUP
Terminal window
docker run --rm -v minecraft_backups:/backups ghcr.io/lucasilverentand/lumo-server:latest ls -lh /backups
Terminal window
docker run --rm -v minecraft_backups:/backups ghcr.io/lucasilverentand/lumo-server:latest du -sh /backups
Terminal window
docker run --rm -v minecraft_backups:/backups ghcr.io/lucasilverentand/lumo-server:latest \
tar -tzf /backups/minecraft-backup-20251219_120000.tar.gz | head -20

The backup system automatically manages old backups:

  • Keeps all backups from the last BACKUP_RETENTION_DAYS days
  • Default: 7 days
  • After daily retention expires, keeps one backup per week
  • Keeps weekly backups for BACKUP_RETENTION_WEEKS weeks
  • Default: 4 weeks

With defaults (7 days + 4 weeks):

  • Day 1-7: All daily backups kept (7 backups)
  • Week 2-5: One backup per week (4 backups)
  • Older: Deleted automatically

Total: ~11 backups at any time

Terminal window
# Keep 14 days + 8 weeks
docker run \
-e BACKUP_RETENTION_DAYS=14 \
-e BACKUP_RETENTION_WEEKS=8 \
ghcr.io/lucasilverentand/lumo-server:latest

Check logs:

Terminal window
docker logs minecraft-server | grep BACKUP

Verify backup is enabled:

Terminal window
docker inspect minecraft-server | grep BACKUP_ENABLED

Check available space:

Terminal window
df -h /var/lib/docker/volumes/

Cleanup old backups manually:

Terminal window
docker run --rm -v minecraft_backups:/backups ghcr.io/lucasilverentand/lumo-server:latest \
find /backups -name "*.tar.gz" -mtime +30 -delete

Fix permissions:

Terminal window
docker exec minecraft-server chown -R minecraft:minecraft /data

Verify credentials:

Terminal window
docker exec minecraft-server aws s3 ls s3://your-bucket

Check S3 endpoint:

Terminal window
docker logs minecraft-server | grep "S3 upload"

Use better compression:

Terminal window
# Use xz instead of gz
docker run -e BACKUP_COMPRESSION=xz ghcr.io/lucasilverentand/lumo-server:latest

Exclude more files (edit /backup.py excludes list)

Test restore process monthly to ensure backups are valid:

Terminal window
# Create test container
docker run -d --name mc-test \
-v minecraft_test_data:/data \
-v minecraft_backups:/backups \
ghcr.io/lucasilverentand/lumo-server:latest /restore.sh latest-backup.tar.gz
# Verify it starts
docker logs mc-test
# Cleanup
docker rm -f mc-test
docker volume rm minecraft_test_data

Always use S3 or rclone for off-site backups. Local-only backups don’t protect against hardware failure.

Track backup sizes over time:

Terminal window
docker run --rm -v minecraft_backups:/backups ghcr.io/lucasilverentand/lumo-server:latest \
find /backups -name "*.tar.gz" -printf "%TY-%Tm-%Td %p %s\n"

Before updating Minecraft version or plugins:

Terminal window
# Force immediate backup
docker exec minecraft-server python3 /backup.py

Keep a note of:

  • Where backups are stored
  • S3/rclone credentials
  • Retention policy
  • Last successful restore test

Use external cron to trigger backups:

Terminal window
# Disable internal backup daemon
docker run -e BACKUP_ENABLED=false ghcr.io/lucasilverentand/lumo-server:latest
# Add cron job on host
0 2 * * * docker exec minecraft-server python3 /backup.py

Enable both S3 and rclone:

Terminal window
docker run \
-e S3_ENABLED=true \
-e S3_BUCKET=primary-backups \
-e RCLONE_ENABLED=true \
-e RCLONE_DEST="secondary:backups" \
ghcr.io/lucasilverentand/lumo-server:latest

Run custom scripts before/after backups:

# Create pre-backup script
docker exec minecraft-server sh -c 'cat > /pre-backup.sh << EOF
#!/bin/bash
# Your custom pre-backup tasks
echo "Running pre-backup tasks..."
EOF'
# Modify backup.py to call hooks

Backups are not encrypted by default. For sensitive data:

Terminal window
# Encrypt backups with GPG
docker run --rm -v minecraft_backups:/backups ghcr.io/lucasilverentand/lumo-server:latest \
gpg --symmetric --cipher-algo AES256 /backups/minecraft-backup-*.tar.gz
  • Use IAM roles for S3 (avoid hardcoded credentials)
  • Restrict S3 bucket access with bucket policies
  • Use rclone encryption for cloud storage

When removing old backups:

Terminal window
# Secure deletion
docker run --rm -v minecraft_backups:/backups ghcr.io/lucasilverentand/lumo-server:latest \
shred -u /backups/old-backup.tar.gz