Skip to content

Automatic Backup for your Valheim Server worlds with 30 day history and automated Discord notifications and Backup Uploads to Google Drive.

License

Notifications You must be signed in to change notification settings

niklasfrick/valheim-server-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

valheim-server-backup

Automatic Backup for your Valheim Server worlds with 30 day history on server, automated Discord notifications and Backup upload to Google Drive.

Getting Started

Prerequisites

  1. 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.
  1. Google Drive Upload from labbots.
  2. ZIP: sudo apt install zip

Usage

1. Get the scripts

  1. Download (or clone) a copy of valheim-server-backup
  2. Place the scripts in /usr/local/sbin/or wherever you want. Be sure to set all the paths correctly if you do so
  3. 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

2. Set world name

  1. Edit line 4 of vhserverbackup.sh and replace ENTERWORLDNAMEHERE with your world name to be backed up

3. Set up a crontab to automate execution

  1. Edit crontabs
crontab -e
  1. 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.

4. Setting up a Discord webhook.

  1. Setup a webhook in the desired Discord text channel
  2. Edit Line 3 of vhserverbackup.sh and set your webhook URL

5. Set up Google Drive Upload:

Link to repo

To-Dos

Built With

  • 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

Inspiration from

About

Automatic Backup for your Valheim Server worlds with 30 day history and automated Discord notifications and Backup Uploads to Google Drive.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages