Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REM SaveBackup.bat
- REM ARK Survival Evolved World Backup Script
- REM by SemlerPDX May2017
- REM
- REM A manual or automatic script to backup the world save folder for ARK: Survival Evolved
- REM Will only keep set maximum number of files, deleting oldest folders first
- REM We have this on web panel button for server admins and it runs every 20 minutes on it's own
- REM Great way to avoid losing data to bugs and making a rolling backup of player and world data
- REM
- REM Usage:
- REM Change value of SAVEDARKSMAX to desired number of backups
- REM Create folder called Backups in your ARK game/server folder at \ShooterGame\Saved\
- REM Call this script from a web panel like TCAdmin or execute from a .bat
- REM For .bat, save contents into root ARK game folder containing ShooterGame folder
- REM **can easily be adapted for simple Minecraft server world backups as well**
- @echo off
- echo Creating new backup...
- set SAVEDARKSMAX=4
- echo %DATE% %TIME%
- for /f "tokens=1-9 delims=::./ " %%A in (
- 'echo %DATE% %TIME%'
- ) do (
- set CURRENTDATETIME=SavedArks_%%B%%C%%D_%%E%%F%%G
- )
- echo Copying SavedArks Folder to ShooterGame\Saved\Backups\%CURRENTDATETIME%...
- md .\ShooterGame\Saved\Backups\%CURRENTDATETIME%
- xcopy /e /k .\ShooterGame\Saved\SavedArks .\ShooterGame\Saved\Backups\%CURRENTDATETIME%
- for /f "skip=%SAVEDARKSMAX% delims=" %%A in (
- 'dir ".\ShooterGame\Saved\Backups\*" /t:c /a:d /o:-d /b'
- ) do (
- echo Deleting oldest World Save Backup: %%A...
- rd /s /q ".\ShooterGame\Saved\Backups\%%A"
- )
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement