Backup System
Eranio
Backup System
Three backup types, restore with intelligent diff-based file replacement, and backup management.
Backup Types
| Type | What's included | Method | API |
|---|---|---|---|
| World | World data only | Native Java Mod API | POST /backups |
| Mods | All mods in mods/ directory |
Daemon ZIP compression | DaemonFileRepository |
| Full | Entire server directory | Daemon ZIP compression | DaemonFileRepository |
Permissions
| Action | Permission |
|---|---|
| View backups | hytale-admin.backups-read |
| Create/restore/delete backups | hytale-admin.backups-manage |
Creating a Backup
| Detail | Value |
|---|---|
| API (World) | POST /backups |
| API (Mods/Full) | Daemon ZIP via DaemonFileRepository |
| Success | "Backup created" |
| Failure | "Backup creation failed" + optional error from $result['error'] |
| Logged as | server:hytale-admin.create-backup |
Backup Process
- Select backup type (world, mods, or full)
- Click Create Backup
- For world backups: API handles the backup natively on the server
- For mods/full backups: Daemon compresses the target directory into a ZIP archive
- Backup stored in the configured
backupDirdirectory - Success notification displayed
What the API error can contain
When backup creation fails, the API may return a specific error message in $result['error']. This could be:
- Insufficient disk space
- Directory not found
- Permission denied
- IO error during compression
Restoring a Backup
| Detail | Value |
|---|---|
| Success | "Backup restored" |
| Failure | "Backup restore failed" |
| Logged as | server:hytale-admin.restore-backup |
Restore Process (Intelligent Diff)
Restoring doesn't simply overwrite everything. The plugin uses an intelligent restoration process:
- Create temporary directory for extraction
- Unzip the backup archive to temp directory
- Diff files — compare backup files with current files
- Move only changed files — only files that differ from current state are replaced
- Clean up temp directory
This approach:
- Preserves files that haven't changed (no unnecessary writes)
- Reduces risk of corrupting currently-used files
- Faster than full overwrite for large servers
Important: Stop the server before restoring to prevent file conflicts.
Deleting a Backup
| Detail | Value |
|---|---|
| Success | "Backup deleted" |
| Failure | "Backup deletion failed" |
| Logged as | server:hytale-admin.delete-backup |
Backup List
The backup table shows all available backups and polls every 60 seconds:
| Column | Description |
|---|---|
| Name | Backup filename |
| Type | World, Mods, or Full |
| Size | File size |
| Created | Timestamp |
| Actions | Restore, Delete |
Troubleshooting
"Backup creation failed"
- Disk space: Check available space on the server
- Permission: Backup directory must be writable
- For mods/full: Daemon must have access to the target directory
- API body error: The
$result['error']message provides specific details - Check
storage/logs/laravel.logfor "Hytale API error"
"Backup restore failed"
- Backup file may be corrupted
- Stop the server first — files may be locked
- Insufficient disk space for temp extraction
- Target directory permissions
Backups don't appear in list
backupDirnot configured inconfig.json- Backup directory is empty
- Daemon can't list directory — check file permissions
- Table polls every 60s — wait or refresh
World backup vs. Full backup — when to use which
| Scenario | Recommended Type |
|---|---|
| Quick save before experiments | World |
| Before updating mods | Mods |
| Before major changes | Full |
| Regular scheduled backups | World (small, fast) |
| Before server migration | Full |