DST Server World Backup Guide (Master & Caves)
This guide shows you how to back up both the Master and Caves worlds of a Don’t Starve Together dedicated server. You’ll learn where the world data lives, what each file does, and how to create a safe, restorable copy so you can roll back griefing, corruption, or failed updates.
What You’ll Need
- Access to the server’s file system (SSH, FTP, or a file manager in your hosting panel).
- Knowledge of the server’s install directory (commonly
~/.klei/DoNotStarveTogetheron Linux). - Optional: a backup tool like
tar(Linux/macOS) or 7-Zip (Windows).
Step-by-Step
- Stop the server. Use your hosting panel’s stop button or run
./stop.shin the server directory. Stopping prevents file changes during the backup, ensuring a consistent snapshot. - Locate the world save folder. The default path on Linux is
~/.klei/DoNotStarveTogether/. Inside, you’ll see one or more cluster folders (e.g.,Cluster_1). Each cluster contains both the Master and Caves world data. - Identify the world folders. Inside a cluster folder, you’ll find
MasterandCavessubfolders. These hold the world save files (save/), mod configuration (modoverrides.lua), and server settings (server.ini). - Copy the entire cluster folder. The simplest method is to copy the whole cluster (e.g.,
Cluster_1) to a safe location. On Linux, use:cp -r ~/.klei/DoNotStarveTogether/Cluster_1 ~/backups/Cluster_1_backup_$(date +%Y%m%d) - Or use tar for a compressed archive. Run:
tar -czvf ~/backups/Cluster_1_$(date +%Y%m%d).tar.gz -C ~/.klei/DoNotStarveTogether Cluster_1. This creates a single compressed file that’s easier to store. - Verify the backup. List the contents of the backup folder or archive to confirm the
MasterandCavesdirectories are present and non-empty. - Restart the server. Start it again via your panel or
./start.sh. The server will continue from the saved state. - Test the backup (optional but recommended). On a test server or a separate instance, restore the backup and confirm the world loads correctly.
Common Mistakes
- Backing up while the server is running. This can lead to corrupted saves because files are being written during the copy.
- Only copying the Master or Caves folder. Both are needed for a full restore; missing one will cause the server to regenerate the world, losing progress.
- Ignoring the
save/subfolder. The actual world data (map, players, entities) is insidesave/. Copying only the cluster root without it will result in an empty world. - Forgetting to include
modoverrides.luaandserver.ini. These contain mod settings and server configuration; without them, the restored server may not behave as expected. - Not compressing large worlds. World files can be hundreds of MB; compressing saves disk space and speeds up transfer.
Tips
- Schedule automatic backups. Use cron (Linux) or Task Scheduler (Windows) to run a backup script daily or weekly.
- Keep multiple backups. Rotate them (e.g., keep the last 7 days) to protect against a corrupted backup that goes unnoticed.
- Store backups offsite. Copy archives to a different drive or cloud storage to guard against hardware failure.
- Use a naming convention with dates. This makes it easy to find a specific restore point.
- Test restores periodically. A backup you can’t restore is worthless; verify at least once a month.
Troubleshooting
- Backup fails with “permission denied”. Ensure the user running the command has read access to the cluster folder and write access to the backup destination. Use
sudoif necessary, but be careful with ownership. - The server won’t start after restoring. This usually means the backup was taken while the server was running or files are missing. Check the server logs for errors. If the world is corrupt, you may need to restore an older backup.
- The world resets after restore. This happens if the
save/folder was not included or the cluster folder structure is wrong. Verify that theMaster/saveandCaves/savedirectories exist and containsession/subfolders. - Backup is too large. Use
tarwith compression (-zfor gzip) or exclude thebackupfolder if you have one inside the cluster (some servers create internal backups). - Can’t find the cluster folder. Check your server’s startup script or config file for the
-conf_dirparameter, which overrides the default path.
Frequently Asked Questions
How often should I back up my DST server?
At least once a day, especially if you have active players. For a busy server, consider every 6 hours. More frequent backups mean less data loss on rollback.
Can I back up only one world (Master or Caves)?
Technically yes, but it’s not recommended. If you restore only one, the other will be out of sync, which can cause issues (e.g., cave resets). Always back up both together.
Do I need to stop the server to back up?
Yes. A live backup is like taking a photo while someone is moving; you’ll get a blurry image. Stopping ensures the files are in a consistent state.
Where are the backups stored on the server?
You choose the location. Common choices are a backups/ folder inside the home directory or an external mount. The important thing is to keep them separate from the cluster folder.
Can I use the in-game console to back up?
No. The in-game console has no backup command. You must use file system tools on the server.
What if I don’t have SSH access?
If your hosting provider only offers FTP, you can still download the cluster folder to your local machine. Many hosts also provide a backup feature in their control panel; use that if available.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.