Skip to content

Commit

Permalink
Back up production-server data on start
Browse files Browse the repository at this point in the history
  • Loading branch information
timgurto committed Apr 7, 2018
1 parent 16fa823 commit cfe5ac4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
9 changes: 9 additions & 0 deletions dev-stuff/batch-files/backup.bat
@@ -0,0 +1,9 @@
@echo off

for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /format:list') do set datetime=%%I
set datetime=%datetime:~0,8%-%datetime:~8,6%
set dirName=backup\%datetime%

mkdir "%dirName%"
xcopy Users %dirName%\Users\ /E
xcopy World %dirName%\World\ /E
3 changes: 3 additions & 0 deletions dev-stuff/batch-files/launch.bat
@@ -0,0 +1,3 @@
start backup.bat
timeout /T 1
start server.exe
2 changes: 1 addition & 1 deletion publish-server.bat
Expand Up @@ -10,4 +10,4 @@ xcopy Images\Items "C:\Hellas server\Images\Items\" /E /Y
rem Start server
C:
cd "C:\Hellas server"
server.exe
launch.bat

0 comments on commit cfe5ac4

Please sign in to comment.