How to Back Up and Restore Game Server Data

Backing Up and Restoring Game Server Data

Regular backups protect your game server world saves, configurations, and plugins from data loss.

What to Back Up by Game

  • Minecraft: ~/server/world/, ~/server/server.properties, ~/server/plugins/
  • Rust: ~/rustserver/server/myserver/ (contains save files)
  • Valheim: ~/.config/unity3d/IronGate/Valheim/worlds_local/
  • ARK: ~/arkserver/ShooterGame/Saved/
  • Project Zomboid: ~/Zomboid/Saves/
  • CS2: ~/cs2server/game/csgo/cfg/

Simple Backup Script

nano ~/gamebackup.sh
#!/bin/bash
DATE=$(date +%Y-%m-%d_%H-%M)
GAME="minecraft"
SAVE_DIR="$HOME/server/world"
BACKUP_DIR="$HOME/backups"
mkdir -p "$BACKUP_DIR"
tar -czf "$BACKUP_DIR/${GAME}-${DATE}.tar.gz" "$SAVE_DIR"
# Keep only the last 10 backups
ls -t "$BACKUP_DIR"/${GAME}-*.tar.gz | tail -n +11 | xargs rm -f
echo "Backup complete."
chmod +x ~/gamebackup.sh
# Schedule: crontab -e → 0 4 * * * ~/gamebackup.sh

Restore from Backup

# Stop the server first
screen -S minecraft -X stuff "stop$(printf '
')"
sleep 10

# Extract backup
tar -xzf ~/backups/minecraft-2026-04-01_04-00.tar.gz -C ~/server/
echo "Restore complete — start the server."

Tips

  • Always stop the server before backing up live world files to avoid corruption
  • Store a copy of backups off-server (use rclone to sync to cloud storage)
  • Test your restore process periodically
  • 0 أعضاء وجدوا هذه المقالة مفيدة
هل كانت المقالة مفيدة ؟

مقالات مشابهة

Setting Up a Minecraft Java Server

Setting Up a Minecraft Java Server Deploy a Minecraft Java Edition server on your dedicated...

Setting Up a CS2 Dedicated Server

Setting Up a Counter-Strike 2 Dedicated Server Deploy a CS2 server using SteamCMD on your...

Managing Game Servers with LinuxGSM

Managing Game Servers with LinuxGSM LinuxGSM (Linux Game Server Manager) simplifies installation...

Setting Up a Rust Dedicated Server

Setting Up a Rust Dedicated Server Step 1 — Install SteamCMD add-apt-repository multiverse -y...

Setting Up a Valheim Dedicated Server

Setting Up a Valheim Dedicated Server Step 1 — Install SteamCMD add-apt-repository multiverse...