Rust Backup and Restore Guide
Protect your server data with regular backups and learn how to restore when needed.
What to Backup
Essential directories and files:
# Server Storage Locations
server/rust/server/ # Main save files
server/rust/proceduralmap/ # Procedural map saves
server/rust/barren/ # Barren saves (if used)
Creating Manual Backups
Windows
# Stop server
# Create backup folder
mkdir backups\%date%
# Copy save files
xcopy server\rust\* backups\%date%\ /E /I
# Restart server
Linux
# Stop server
systemctl stop rustserver
# Create backup directory
BACKUP_DIR="/path/to/backups/$(date +%Y%m%d_%H%M%S)"
mkdir -p "$BACKUP_DIR"
# Copy save files
cp -r server/rust/* "$BACKUP_DIR/"
# Create archive
tar -czf "$BACKUP_DIR.tar.gz" "$BACKUP_DIR"
# Restart server
systemctl start rustserver
Automated Backups
Windows Task Scheduler
# Create backup_script.bat
@echo off
set BACKUP_DIR="C:\rustserver\backups\%date:~-4,4%%date:~-7,2%%date:~-10,2%"
mkdir %BACKUP_DIR%
xcopy "C:\rustserver\server\rust\*" %BACKUP_DIR%\ /E /I /Y
# Schedule with Task Scheduler
# Run every 4 hours
Linux Cron Job
# Add to crontab (crontab -e)
# Backup every 4 hours
0 */4 * * * /path/to/backup_script.sh
# Backup daily at 3 AM
0 3 * * * /path/to/backup_script.sh
# backup_script.sh content:
#!/bin/bash
RUST_DIR="/path/to/rust/server"
BACKUP_DIR="/path/to/backups/$(date +%Y%m%d_%H%M%S)"
mkdir -p "$BACKUP_DIR"
systemctl stop rustserver
cp -r "$RUST_DIR/rust" "$BACKUP_DIR/"
systemctl start rustserver
tar -czf "$BACKUP_DIR.tar.gz" "$BACKUP_DIR"
rm -rf "$BACKUP_DIR"
Restoring from Backup
Full Restore
# Stop server
systemctl stop rustserver
# Remove current saves
rm -rf server/rust/*
# Extract backup
tar -xzf backups/20250119_030000.tar.gz
# Copy files back
cp -r 20250119_030000/* server/rust/
# Restart server
systemctl start rustserver
Player Data Restore
Restore specific player data:
# Extract backup
tar -xzf backups/backup.tar.gz
# Find player data
# Located in server/rust/proceduralmap/player.deaths/
# and server/rust/proceduralmap/player.identities/
# Copy specific files
cp backup/rust/proceduralmap/player.deaths/steamid.* server/rust/proceduralmap/player.deaths/
Rust++ Backups
If using Rust++:
# Rust++ uses different save structure
server/rust+/saves/
# Backup Rust++ files
cp -r server/rust+/saves backups/rust++_$(date +%Y%m%d)
Database Files Explained
- player.deaths: Player death history
- player.identities: Player progress and stats
- player.states: Current player states
- user/: User account data
- entity/: All entities (bases, items)
Backup Retention
Implement retention policy to save disk space:
# Keep backups for 7 days
find /path/to/backups -name "rust_backup_*.tar.gz" -mtime +7 -delete
# Or keep daily, weekly, monthly
# Daily for 7 days
# Weekly for 4 weeks
# Monthly for 3 months
Cloud Backup
Upload backups to cloud storage:
# AWS S3
aws s3 sync /path/to/backups s3://bucket-name/rust/
# Google Cloud Storage
gsutil -m rsync -r /path/to/backups gs://bucket-name/rust/
# rclone (multi-cloud)
rclone sync /path/to/backups remote:bucket/rust/
Warning: Always stop the server before creating backups to ensure save file consistency.
Troubleshooting
Corrupted Backup
- Try older backup
- Verify file integrity
- Check for incomplete transfers
- Use file recovery tools if needed
Restore Failed
- Verify file permissions
- Check disk space
- Ensure server is stopped
- Review file format and structure
Pro Tip: Test your restore procedure regularly to ensure it works when you actually need it.