Created
July 1, 2024 17:24
-
-
Save fishd72/d28213b3138046e1652598e13cfa8dab to your computer and use it in GitHub Desktop.
Start of a backup solution for Valheim dedicated server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
now=$(date +"%y%m%d") | |
status=$(systemctl check moddedvalheim.service) | |
if [ "$status" == "active" ]; then | |
echo "Seems like the server is still active!" | |
exit 1 | |
else | |
echo "Backup starting..." | |
echo "Creating backup file Backup_$now.tar.gz" | |
tar -cvf Backup_$now.tar.gz /home/steam/.config/unity3d/IronGate/Valheim/worlds_local/HeartHome.db | |
tar -rvf Backup_$now.tar.gz /home/steam/.config/unity3d/IronGate/Valheim/worlds_local/HeartHome.fwl | |
tar -rvf Backup_$now.tar.gz /home/steam/valheimserver/start_server_bepinex.sh | |
tar -rvf Backup_$now.tar.gz /home/steam/valheimserver/BepInEx/config/games.nwest.valheim.discordconnector/discordconnector.cfg | |
tar -rvf Backup_$now.tar.gz /home/steam/valheimserver/BepInEx/config/games.nwest.valheim.discordconnector/discordconnector-messages.cfg | |
tar -rvf Backup_$now.tar.gz /home/steam/.config/unity3d/IronGate/Valheim/adminlist.txt | |
tar -rvf Backup_$now.tar.gz /home/steam/.config/unity3d/IronGate/Valheim/bannedlist.txt | |
tar -rvf Backup_$now.tar.gz /home/steam/.config/unity3d/IronGate/Valheim/permittedlist.txt | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment