__RaDaR__ 2 Posted January 3, 2019 This is my server backup script you can call 2 seconds after a restart in your BEC Scheduler.xml see below. @echo off for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%a set YYYY=%dt:~0,4% set MM=%dt:~4,2% set DD=%dt:~6,2% set HH=%dt:~8,2% set Min=%dt:~10,2% set Sec=%dt:~12,2% set stamp=dayz_Server_Backup_%YYYY%%MM%%DD%@%HH%%Min% cd C:\backup mkdir %stamp% cd %stamp% xcopy c:\dayz\mpmissions\dayzOffline.chernarusplus\storage_1\*.* /s <job id='27'> <day>1,2,3,4,5,6,7</day> <start>23:55:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 SERVER RESTARTING IN 5 MINUTES</cmd> </job> <job id='28'> <day>1,2,3,4,5,6,7</day> <start>23:59:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 SERVER RESTARTING IN 1 MINUTE</cmd> </job> <job id='29'> <day>1,2,3,4,5,6,7</day> <start>23:59:30</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 SERVER RESTARTING IN 30 SECONDS</cmd> </job> <job id='30'> <day>1,2,3,4,5,6,7</day> <start>00:00:01</start> <runtime>000000</runtime> <loop>0</loop> <cmd>C:\scripts\kill-dayz.bat</cmd> </job> <job id='31'> <day>1,2,3,4,5,6,7</day> <start>00:00:03</start> <runtime>000000</runtime> <loop>0</loop> <cmd>C:\scripts\backup.bat</cmd> </job> Then run this small delage64 script once a day this will limit your backups to only 20 days worth. Download DelAge32/64 2.55 Here @echo off delage64.exe "c:\backup\*.*" 20 /recurse /rd Hope this helps. RaDaR Share this post Link to post Share on other sites
Ton_41 1 Posted January 4, 2019 (edited) Is this script backup.bat ? @echo off for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%a set YYYY=%dt:~0,4% set MM=%dt:~4,2% set DD=%dt:~6,2% set HH=%dt:~8,2% set Min=%dt:~10,2% set Sec=%dt:~12,2% set stamp=dayz_Server_Backup_%YYYY%%MM%%DD%@%HH%%Min% cd C:\backup mkdir %stamp% cd %stamp% xcopy c:\dayz\mpmissions\dayzOffline.chernarusplus\storage_1\*.* /s where the script kill-dayz.bat? and whait this scrip ? @echo off delage64.exe "c:\backup\*.*" 20 /recurse /rd Edited January 4, 2019 by Ton_41 Share this post Link to post Share on other sites
__RaDaR__ 2 Posted January 4, 2019 This is the small snippet script to kill the server. @echo off TITLE DayZ Kill Server Script taskkill /im DayZServer_x64.exe running delage64.exe "c:\backup\*.*" 20 /recurse /rd Will delete all files, directories and sub directories older than 20 days this is purley for good houskeeping. Hope that helps RaDaR Share this post Link to post Share on other sites
Ton_41 1 Posted January 4, 2019 2 hours ago, radar121 said: This is the small snippet script to kill the server. @echo off TITLE DayZ Kill Server Script taskkill /im DayZServer_x64.exe running delage64.exe "c:\backup\*.*" 20 /recurse /rd Will delete all files, directories and sub directories older than 20 days this is purley for good houskeeping. Hope that helps RaDaR kill-dayz.bat >>>>> @echo off TITLE DayZ Kill Server Script taskkill /im DayZServer_x64.exe =========== use in job 30 ======== backup.bat >>>>. @echo off for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%a set YYYY=%dt:~0,4% set MM=%dt:~4,2% set DD=%dt:~6,2% set HH=%dt:~8,2% set Min=%dt:~10,2% set Sec=%dt:~12,2% set stamp=dayz_Server_Backup_%YYYY%%MM%%DD%@%HH%%Min% cd C:\backup mkdir %stamp% cd %stamp% xcopy c:\dayz\mpmissions\dayzOffline.chernarusplus\storage_1\*.* /s ===== Use in job 31 ======== all right? Share this post Link to post Share on other sites
__RaDaR__ 2 Posted January 6, 2019 On 04/01/2019 at 12:09 PM, Ton_41 said: kill-dayz.bat >>>>> @echo off TITLE DayZ Kill Server Script taskkill /im DayZServer_x64.exe =========== use in job 30 ======== backup.bat >>>>. @echo off for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%a set YYYY=%dt:~0,4% set MM=%dt:~4,2% set DD=%dt:~6,2% set HH=%dt:~8,2% set Min=%dt:~10,2% set Sec=%dt:~12,2% set stamp=dayz_Server_Backup_%YYYY%%MM%%DD%@%HH%%Min% cd C:\backup mkdir %stamp% cd %stamp% xcopy c:\dayz\mpmissions\dayzOffline.chernarusplus\storage_1\*.* /s ===== Use in job 31 ======== all right? Yes, have the backup script run 2 seconds after server restart. RaDaR... Share this post Link to post Share on other sites
ROGUE[WOLF] 0 Posted January 7, 2019 So this has to be entered after each shutdown command in the scheduler.xml file? Share this post Link to post Share on other sites