Premium Only Content
 
			How to Backup Valheim Dedicated Server
In this video I share my method for backup and restore of my Dedicated Valheim Server worlds. I only back up the worlds directory, so the scope of the backup is strictly the world itself and not the Valheim Server binaries.
Follow my instructions on how to install Valheim Server first: https://www.youtube.com/watch?v=4llm0M0FaG0
# vi backup.sh
#!/bin/bash
####################################
#
# Backup Valheim Saved game to a
# specified folder.
#
####################################
# What to backup.
backup_files="/home/steam/.config/unity3d/IronGate/Valheim/worlds"
backup_file_name="valheim"
# Specify which directory to backup to.
# Make sure you have enough space to hold {n} days of backups.
dest="/home/steam/backups"
# Create backup archive filename.
day=$(date +"%Y-%m-%d_%H-%M-%S")
archive_file="$day-$backup_file_name.tar.gz"
# Stop valheimserver Server
systemctl stop valheimserver
# Backup the files using tar.
tar zcvf $dest/$archive_file $backup_files
# Clear backups
/home/steam/clear_backups.sh
# Start valheimserver Server
systemctl start valheimserver
# chmod +x backup.sh
# vi clear_backups.sh
#!/bin/bash
####################################
#
# Clean up Valheim saved game to a
# specified folder.
#
####################################
# -mtime +30 means any file older than 30 days
find /home/steam/backups -type f -mtime +30 -exec rm -f {} \;
# chmod +x clear_backups.sh
# crontab -l
0 3 * * * /home/steam/backup.sh
Restoring a backup:
E.g.
# Stop Valheim Server
systemctl stop valheimserver
# Remove existing data
rm -rf /home/steam/.config/unity3d/IronGate/Valheim/worlds/*
# Restore a saved file.
tar -xvf /home/steam/backups/2021-02-18_03-00-01-valheim.tar.gz -C /
# Restore permissions on files
chown steam:steam -R /home/steam/.config/unity3d/IronGate/Valheim/worlds
# Start Valheim Server
systemctl start valheimserver
- 	
				 8:27 8:27Geekhead4 years agoHow to Copy Valheim World to Dedicated Server20
- 	
				 1:41 1:41Quicksand Riggs4 years agoTransferring To New Server - Valheim24
- 	
				 11:20 11:20Quicksand Riggs4 years agoHow Damaging Status Effects Work - Valheim17
- 	
				 5:34 5:34Quicksand Riggs4 years agoHow To Stop Enemies From Spawning - Valheim29
- 	
				 4:42 4:42†Lion Knight Warrior â€4 years agoValheim : First Build641
- 	
				 30:14 30:14johnb414 years agoServer 2016 virtualisation112
- 	
				 5:48 5:48Quicksand Riggs4 years agoHow To Get Maximum Comfort - Valheim542
- 	
				 26:15 26:15johnb414 years agoServer 2008 configuration43
- 	
				 29:57 29:57johnb414 years agoServer 2008 virtualisation51
- 	
				 12:46 12:46Quicksand Riggs4 years agoSmelting Tower - Valheim23