Backup Configuration
Protect your server data with automatic backups.
Command Line Options
Section titled “Command Line Options”Enable automatic backups with command-line arguments:
java -Xms4G -Xmx4G -jar HytaleServer.jar \ --assets ../HytaleAssets \ --backup \ --backup-dir ./backups \ --backup-frequency 30 \ --backup-max-count 5Backup Options
Section titled “Backup Options”| Option | Description | Default |
|---|---|---|
--backup | Enable automatic backups | disabled |
--backup-dir <path> | Backup directory (required when --backup is enabled) | none |
--backup-frequency <minutes> | Minutes between backups (minimum: 1) | 30 |
--backup-max-count <count> | Maximum backups to keep in each directory | 5 |
Example Configurations
Section titled “Example Configurations”Frequent Backups (High Activity Server)
Section titled “Frequent Backups (High Activity Server)”java -Xms4G -Xmx4G -jar HytaleServer.jar \ --assets ../HytaleAssets \ --backup \ --backup-dir ./backups \ --backup-frequency 15 \ --backup-max-count 10Backs up every 15 minutes, keeps last 10 backups (2.5 hours of history).
Hourly Backups (Low Activity Server)
Section titled “Hourly Backups (Low Activity Server)”java -Xms4G -Xmx4G -jar HytaleServer.jar \ --assets ../HytaleAssets \ --backup \ --backup-dir ./backups \ --backup-frequency 60 \ --backup-max-count 24Backs up every hour, keeps last 24 backups (24 hours of history).
Extended History
Section titled “Extended History”java -Xms4G -Xmx4G -jar HytaleServer.jar \ --assets ../HytaleAssets \ --backup \ --backup-dir /mnt/backup-drive/hytale \ --backup-frequency 30 \ --backup-max-count 48Backs up every 30 minutes to external drive, keeps 48 backups (24 hours of history).
Backup Format and Storage
Section titled “Backup Format and Storage”Backups are stored as ZIP archives with filenames in the format yyyy-MM-dd_HH-mm-ss.zip (e.g., 2024-01-15_14-30-00.zip).
The backup directory structure:
backups/├── 2024-01-15_14-30-00.zip # Recent backups├── 2024-01-15_14-00-00.zip├── 2024-01-15_13-30-00.zip└── archive/ # Archived backups (automatic) └── 2024-01-14_12-00-00.zipAutomatic Archiving
Section titled “Automatic Archiving”The server automatically archives older backups before deletion:
- Every 12 hours, the oldest backup is moved to the
archive/subdirectory instead of being deleted - The archive directory also respects
--backup-max-count
Backup Contents
Section titled “Backup Contents”Each backup ZIP contains the entire universe/ directory:
- All world data and chunk files
- Player data
- World configurations
Manual Backup Command
Section titled “Manual Backup Command”Use the /backup command in-game or from the console to trigger an immediate backup:
/backupNote: This command requires --backup-dir to be configured, even if --backup is not enabled.
Manual Backup (Server Stopped)
Section titled “Manual Backup (Server Stopped)”For manual backups when the server is stopped:
# Stop server first, then:cp -r universe/ backups/manual-backup-$(date +%Y%m%d-%H%M%S)/Restore from Backup
Section titled “Restore from Backup”- Stop the server
- Extract the backup ZIP
- Replace the
universe/directory - Start the server
# Stop serversudo systemctl stop hytale
# Restore backuprm -rf universe/unzip backups/2024-01-15_14-30-00.zip -d .
# Start serversudo systemctl start hytalePermissions
Section titled “Permissions”| Permission | Description |
|---|---|
hytale.status.backup.error | Receive in-game notifications when a backup fails |
Players with the hytale.status.backup.error permission will be notified in-game if a backup operation fails.
Best Practices
Section titled “Best Practices”- Test restores regularly - Verify backups work
- Store off-site copies - Protect against hardware failure
- Monitor disk space - Ensure room for backups
- Document backup schedule - Know your recovery point
- Automate notifications - Alert on backup failures
External Backup Solutions
Section titled “External Backup Solutions”Consider combining with:
- Cloud storage (AWS S3, Google Cloud Storage)
- Rsync to remote servers
- Scheduled cron jobs for additional copies
- RAID storage for redundancy