Automatic Backup for your Valheim Server worlds with 30 day history on server, automated Discord notifications and Backup upload to Google Drive.
- This backup method uses the Dedicated Valheim Server Script from Nimdy:
- Dedicated_Valheim_Server_Script - Valheim Installer and Menu System for managing your Valheim Dedicated Server. Supports Vanilla or Mod modes. Built on Ubuntu 20.04.
- Google Drive Upload from labbots.
- ZIP:
sudo apt install zip
- Download (or clone) a copy of
valheim-server-backup
- Place the scripts in
/usr/local/sbin/
or wherever you want. Be sure to set all the paths correctly if you do so - Give files execution permissions
chmod +x /usr/local/sbin/discord.sh
chmod +x /usr/local/sbin/vhclearbackups.sh
chmod +x /usr/local/sbin/vhserverbackup.sh
- Edit line 4 of
vhserverbackup.sh
and replace ENTERWORLDNAMEHERE with your world name to be backed up
- Edit crontabs
crontab -e
- On a new line place following code (this runs the backup every morning at 5am)
0 5 * * * /usr/local/sbin/vhserverbackup.sh
You can set the time an occurence to whatever you like. You'll find some help at crontab.guru.
- Setup a webhook in the desired Discord text channel
- Edit Line 3 of
vhserverbackup.sh
and set your webhook URL
- discord.sh - Write-only command-line Discord webhook integration written in 100% Bash script
- google-drive-upload - Bash scripts to upload files to google drive
- ValheimBackupandNotifications - Script for daily backups of Valheim Dedicated server, and sending notifications to Discord.
- Geekhead YouTube tutorial for Backups