[TOOL] Auto-Backup, Update, and Restart Batch File
Posted: Thu Jun 11, 2015 9:36 am
Tested to work with Windows Server 2008 R2 (this is Windows 7 of Windows Server)
Follow one of the many "Set up your server guides"
Copy this for your BATCH file and place it ANYWHERE
Change the paths as are applicable to you.
Remember: NO QUOTES OR SPACES BEFORE OR AFTER THE EQUAL SIGNS (if you do that you'll break it)
- This batch file will make sure your SavedArk directory is backed up to a separate directory.
- It will make sure to run the potential update when it forces a restart.
- It will launch your ARK Server and restart back at the first item I listed here.
Follow one of the many "Set up your server guides"
Copy this for your BATCH file and place it ANYWHERE
Change the paths as are applicable to you.
Remember: NO QUOTES OR SPACES BEFORE OR AFTER THE EQUAL SIGNS (if you do that you'll break it)
Code: Select all
@echo off
REM Server path sections
REM Set to ARK Server Path Root
SET ark_server_path=C:\Games\ark_server\
REM Set to SteamCMD Path Root
SET steamcmd_path=C:\Games\SteamCMD\
REM Set to where you want your SavedArks to back up to (NOT THE SAVEDARK DIRECTORY IT SELF!)
SET savedark_backup_path=C:\Games\SavedArkBackup
REM Server Settings Section
SET servername=CHANGETHIS
SET maximum_players=20
SET server_password=CHANGETHIS
SET admin_password=CHANGETHIS
REM DO NOT CHANGE BELOW THIS LINE!
SET query_port=27015
SET savedark_path=%ark_server_path%ShooterGame\Saved\SavedArks
:ARK
xcopy /f /s /v /z /i /-y /y %savedark_path% %savedark_backup_path%\%DATE:~-4%-%DATE:~4,2%-%DATE:~7,2%
cd %steamcmd_path%
steamcmd.exe +login anonymous +force_install_dir %ark_server_path% +app_update 376030 +quit
cd %ark_server_path%ShooterGame\Binaries\Win64
ShooterGameServer.exe TheIsland?QueryPort=27015?SessionName=%servername%?MaxPlayers=%maximum_players%?listen?ServerPassword=%server_password%?ServerAdminPassword=%admin_password% -nosteamclient -game -server -log
goto ARK