A backup is the difference between a small accident and losing months of work. Yet many server owners forget to set it up. In this article, we explain how to properly manage backups.
What should you back up?
- Worlds: the world folder contains all blocks, structures, and chest contents. This is the most important.
- Plugin data: the plugins folder contains configuration and databases from your plugins (economy, permissions, warps, etc.).
- Server configuration: server.properties, bukkit.yml, spigot.yml, paper.yml, and other config files.
- Databases: if you use MySQL/MariaDB, export your databases separately.
Method 1: Manual backups
The simplest method: copy your server files to a safe location.
# Stop the server or use save-all + save-off /save-all /save-off # Create a compressed archive tar -czf backup-$(date +%Y%m%d).tar.gz /path/to/server/ # Re-enable saving /save-on
Downside: you have to remember to do it, and the server pauses briefly.
Method 2: Plugin-based backups
Plugins like eBackup or DriveBackupV2 automate the process:
- eBackup: simple and lightweight. Creates periodic backups and maintains a maximum count.
- DriveBackupV2: uploads backups to Google Drive, OneDrive, Dropbox, or FTP. Ideal for off-site backups.
eBackup example configuration:
backup-interval: 360 # Every 6 hours max-backups: 10 # Keep 10 backups backup-format: zip
Method 3: Server-side scripts
A cron job that automatically creates backups:
# Add to crontab (crontab -e) 0 */6 * * * /root/scripts/minecraft-backup.sh
Example backup script:
#!/bin/bash SERVER_DIR="/opt/minecraft" BACKUP_DIR="/backups/minecraft" DATE=$(date +%Y%m%d-%H%M) # Send save-all to the server screen -S minecraft -X stuff "save-all$(printf '\r')" sleep 10 # Create backup tar -czf "$BACKUP_DIR/backup-$DATE.tar.gz" "$SERVER_DIR/world" "$SERVER_DIR/plugins" # Delete backups older than 7 days find "$BACKUP_DIR" -name "backup-*.tar.gz" -mtime +7 -delete
Method 4: Pterodactyl backups
If you use Pterodactyl (like at HostValues), you can create backups via the panel:
- Go to your server in the panel.
- Click on "Backups".
- Click "Create Backup".
- The backup is automatically compressed and stored.
You can also set up automatic backups via the Schedule feature.
Restoring a backup
- Stop the server.
- Rename the current world folder (e.g., world to world-old).
- Extract the backup to the original location.
- Start the server.
- Test that everything works.
- Only delete the old world folder once you are sure the backup is good.
Best practices
- Create backups at least every 6 hours.
- Store backups in a different location than the server.
- Regularly test that you can restore your backups.
- Always create a manual backup before major changes (plugin updates, WorldEdit operations).
- Keep at least a week of backups so you can restore older versions.
Can I create a backup while the server is running?
Yes, but always use /save-all and /save-off first. This ensures all data is written to disk and prevents corruption during copying. Do not forget /save-on afterwards.
How much storage do I need for backups?
An average Minecraft world is 500 MB to 5 GB compressed, depending on size and age. With 10 backups, you need 5-50 GB. Use compression (tar.gz or zip) to save space.
What if my backup is corrupt?
That is why you keep multiple backups. If the newest is corrupt, you can fall back to an older version. Test your backups regularly by restoring them on a test server.
Create automatic backups on your Minecraft server at HostValues via the Pterodactyl panel.