Table of Contents
- Backup & Restore
- 1. Overview
- 2. Valheim’s Internal Rolling Backup System
- 3. Container-Managed Backup System
- 4. Backup Configuration
- 5. Backup Creation Process
- 6. Restoring a World
- Option A — Restore from Container Backup (Recommended)
- Option B — Restore from Valheim’s Internal Rolling Backups
- 7. Best Practices
- 8. Troubleshooting
- Next Steps
Backup & Restore
This page explains how world backups work in the Managed Valheim server, including both the container’s automated backup system and Valheim’s own internal rolling backup mechanism. Together, these provide multiple layers of protection for your world data.
1. Overview
The Managed Valheim server provides two independent backup systems:
- Container-managed backups — configurable interval, timestamped ZIP archives, automatic pruning.
- Valheim internal rolling backups — built-in game mechanism that keeps up to 5 rotating world snapshots.
Understanding both systems ensures safe restores and reliable world recovery.
2. Valheim’s Internal Rolling Backup System
Valheim automatically maintains a set of rolling backups for each world. These backups are stored alongside the main world files and are created by the game itself during save operations.
Internal backups are located here:
/root/.config/unity3d/IronGate/Valheim/worlds_local/<WORLD_NAME>
Inside this directory, you will see files such as:
<WORLD_NAME>.db— primary world database<WORLD_NAME>.fwl— world metadata<WORLD_NAME>_1.db<WORLD_NAME>_2.db<WORLD_NAME>_3.db<WORLD_NAME>_4.db<WORLD_NAME>_5.db
Valheim rotates these files automatically, keeping the last 5 save states. These backups are not compressed and not pruned by the container — they are fully managed by the game.
You can restore from these internal backups by replacing the main
.db and .fwl files with one of the numbered versions.
3. Container-Managed Backup System
In addition to Valheim’s internal backups, the container provides a configurable backup system that creates timestamped ZIP archives of the entire world directory.
Backups are stored in:
/backups
Each backup follows this naming format:
<WORLD_NAME>_YYYY-MM-DD_HH-MM-SS.zip
4. Backup Configuration
Configure backup behavior using environment variables:
| Variable | Default | Description |
|---|---|---|
BACKUP_INTERVAL |
21600 | Backup interval (seconds). Default is 6 hours. |
BACKUP_RETENTION_DAYS |
7 | Days to retain backups before pruning. |
These values can be changed at any time without rebuilding the container.
5. Backup Creation Process
During each backup cycle, the container:
- Locates the world directory
- Creates a ZIP archive in
/backups - Logs the backup creation
- Prunes backups older than
BACKUP_RETENTION_DAYS
This process runs in the background and does not interrupt gameplay.
6. Restoring a World
Option A — Restore from Container Backup (Recommended)
- Stop the TrueNAS SCALE app.
- Extract the desired ZIP file from
/backups. - Copy the extracted world directory into:
/root/.config/unity3d/IronGate/Valheim/worlds_local/<WORLD_NAME> - Ensure filenames match the world name exactly.
- Start the TrueNAS SCALE app.
Option B — Restore from Valheim’s Internal Rolling Backups
If you prefer to use Valheim’s built-in backups:
- Stop the TrueNAS SCALE app.
- Navigate to:
/root/.config/unity3d/IronGate/Valheim/worlds_local/<WORLD_NAME> - Choose one of the numbered backups (e.g.,
_3.db). - Replace:
<WORLD_NAME>.db
<WORLD_NAME>.fwl
with the corresponding numbered versions. - Start the TrueNAS SCALE app.
The server will load the restored world automatically.
7. Best Practices
- Use container backups for long-term retention.
- Use Valheim’s internal backups for quick rollbacks.
- Always stop the server before restoring files.
- Keep multiple container backups before major mod changes.
8. Troubleshooting
No Backups Are Appearing
- Verify the
/backupsvolume is mounted. - Check container logs for backup messages.
- Ensure
BACKUP_INTERVALis set correctly.
Backups Are Not Being Pruned
- Verify
BACKUP_RETENTION_DAYSis set. - Check file permissions on the backup directory.
Next Steps
With both backup systems available, your Valheim world is protected against corruption, mod issues, and accidental loss.