Desert Forge IT — Arizona IT · Field-tested tools & guidesFree consult →

How to Set Up Automatic Minecraft World Backups

Beginner 15 min — Schedule automatic backups with scripts and cron.

Why Backups Matter

World corruption, griefers, accidental TNT, or a bad plugin update can destroy hours of work. Regular automated backups let you roll back to any point. The world folder is only a few hundred MB — backups are cheap.

What to Back Up

  • world/ — overworld
  • world_nether/ — nether dimension
  • world_the_end/ — end dimension
  • plugins/ — plugin configs and data
  • server.properties — server configuration
  • banned-players.json, whitelist.json

Simple Backup Script

#!/bin/bash
# /opt/minecraft/backup.sh
BACKUP_DIR="/opt/minecraft/backups"
SERVER_DIR="/opt/minecraft"
DATE=$(date +%Y%m%d-%H%M)
MAX_BACKUPS=28  # Keep 7 days of 4x daily backups

mkdir -p "$BACKUP_DIR"

# Create backup
tar czf "$BACKUP_DIR/world-$DATE.tar.gz" \
  -C "$SERVER_DIR" world world_nether world_the_end

# Delete old backups
ls -t "$BACKUP_DIR"/world-*.tar.gz | tail -n +$((MAX_BACKUPS+1)) | xargs -r rm

echo "Backup complete: world-$DATE.tar.gz"
chmod +x /opt/minecraft/backup.sh

Schedule with Cron

crontab -e
# Every 6 hours:
0 */6 * * * /opt/minecraft/backup.sh >> /var/log/mc-backup.log 2>&1

Server-Side Plugin Alternative

DriveBackupV2 plugin can backup directly to Google Drive, OneDrive, or FTP:

  • Install from SpigotMC
  • Configure cloud credentials in config.yml
  • Set backup schedule and retention
  • Backs up while server is running with save-off/save-on

Sync to Cloud with rclone

# Install rclone
curl https://rclone.org/install.sh | bash

# Configure (interactive)
rclone config

# Sync backups to cloud
rclone sync /opt/minecraft/backups remote:mc-backups

Test Your Restores

A backup you've never tested is not a backup:

# Test restore to a temp directory
mkdir /tmp/test-restore
tar xzf /opt/minecraft/backups/world-latest.tar.gz -C /tmp/test-restore
ls /tmp/test-restore/world/level.dat && echo 'Restore OK'

Do this monthly.

Play with friends?

Desert Forge hosting starts at $2/week — instant setup, DDoS protection, free tier available.

Get a server

← Back to Knowledge Base

DF: Game Hosting

Skip the setup. Game servers from $2/week with instant deployment.

Get a server