Jump to content
DrZeddy

Persistence Files?

Recommended Posts

What files should I back up to preserve server persistence?
 

I will be carrying out the back up MANUALLY...

As and when free time allows...

 

Also...

If a server is restarted, does the persistence go too?

 

Thank You

 

 

Share this post


Link to post
Share on other sites
3 minutes ago, Fun Automat said:

copy the whole folder...

The whole of dayzOffline.chernarusplus folder?

or the whole of the Storage_1 folder?

 

Thank You 

Share this post


Link to post
Share on other sites
2 hours ago, DrZeddy said:

Also...

If a server is restarted, does the persistence go too?

If it's a graceful restart (i.e. not a server crash), then no, the persistence files don't go -- they stay put and the world should look as it did a few moments ago when the server comes back up.  If the server crashes however, the persistence files get corrupted and so the server ignores them and recreates the world based on what's defined in the XML files.

Share this post


Link to post
Share on other sites
15 hours ago, Fun Automat said:

L'ensemble du dossier Storage_1 ....

 

 

i agree that

Share this post


Link to post
Share on other sites

Here is my backup script you can run it run it directly after the server restart command in BEC Scheduler.xml

@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=GOB_Server_Backup_%YYYY%%MM%%DD%@%HH%%Min%
cd C:\backup
mkdir %stamp%
cd %stamp%

xcopy c:\dayz\mpmissions\dayz.chernarusplus\*.* /s 

 

<job id='0'>
<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='1'>
<day>1,2,3,4,5,6,7</day>
<start>00:00:01</start>
<runtime>000000</runtime>
<loop>0</loop>
<cmd>path to script\kill-dayz.bat</cmd>
</job>

<job id='2'>
<day>1,2,3,4,5,6,7</day>
<start>00:00:03</start>
<runtime>000000</runtime>
<loop>0</loop>
<cmd>path to script\backup.bat</cmd>
</job>

Radar...

Share this post


Link to post
Share on other sites
On 26/12/2018 at 10:12 PM, drgullen said:

If it's a graceful restart (i.e. not a server crash), then no, the persistence files don't go -- they stay put and the world should look as it did a few moments ago when the server comes back up.  If the server crashes however, the persistence files get corrupted and so the server ignores them and recreates the world based on what's defined in the XML files.

 

I was unable to get  BEC running properly,

So I got rid of it completely.

The server just runs with BattlEye enabled and no admin control panel.

What I normally do is wait until there are no players logged in, then I manually restart the server, by clicking on the little [X] in the top right of the window.

I reboot the pc then restart the server running again.

I know its not the best way, And the message display is now handled by the server itself since V1.00 so I never bothered to install BEC again.

Maybe at a later point in time I will use the BattlEye RCON.EXE to manage it.

I'm still learning as I go along... 

I just leave the server running non stop most times.

I get around 10 hours daylight and approx 22 mins of night time  (These values are REAL TIME 10 hours daylight and 20 mins night... then its day again)

And I just restart it occasionally to stop the log files getting huge.

Please don't laugh Hahaha

 

 

Share this post


Link to post
Share on other sites
8 hours ago, radar121 said:

Here is my backup script you can run it run it directly after the server restart command in BEC Scheduler.xml


@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=GOB_Server_Backup_%YYYY%%MM%%DD%@%HH%%Min%
cd C:\backup
mkdir %stamp%
cd %stamp%

xcopy c:\dayz\mpmissions\dayz.chernarusplus\*.* /s 

 


<job id='0'>
<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='1'>
<day>1,2,3,4,5,6,7</day>
<start>00:00:01</start>
<runtime>000000</runtime>
<loop>0</loop>
<cmd>path to script\kill-dayz.bat</cmd>
</job>

<job id='2'>
<day>1,2,3,4,5,6,7</day>
<start>00:00:03</start>
<runtime>000000</runtime>
<loop>0</loop>
<cmd>path to script\backup.bat</cmd>
</job>

Radar...

Thank You Radar,

 

I have saved your script and will use it manually to back up the server persistence,

(taking it for granted that it is okay to end the server by clicking on the little red [X] in the top right of the window ad its not corrupted already)

 

 

Share this post


Link to post
Share on other sites

Well, if you are manually controlling the restarts, then it's easy in terms of knowing if there's corruption -- if the server isn't running and you didn't manually stop it, then it crashed and your persistence is now corrupted.

In your latest post, you don't mention taking backups at all.  You should try to backup your persistence files at least once a day otherwise your players are eventually going to lose everything they've built and stashed.  Here's a similar copy command to the one that I am going to be using on my server:

robocopy C:\Steam\steamapps\common\DayZServer\mpmissions\dayzOffline.chernarusplus\storage_1 C:\users\{login ID}\documents\DayZServer\storage_backup /E /R:2 /W:2

You would change login ID to your name of course.  Robocopy works better than xcopy because those two switches on the end will pause and retry if by chance the server was updating the file that you were trying to copy, meaning you can safely execute this command while the server is running.  If you execute this a few times a day (and just after you shut down the server assuming you had no corruption), then you will have some backup persistence that you can restore in the case of a crash so you at least don't lose everything that was in the world previously.

One way to know if your persistence is corrupted is if any of the bin files inside the storage_1/data folder have a size of 0 KB.  If any of them do, you had a crash most likely and the files in that folder will be replaced upon the next server restart. 

Share this post


Link to post
Share on other sites
On 31/12/2018 at 6:53 PM, DrZeddy said:

Thank You Radar,

 

I have saved your script and will use it manually to back up the server persistence,

(taking it for granted that it is okay to end the server by clicking on the little red [X] in the top right of the window ad its not corrupted already)

 

 

I have had no issues restarting the server every 4 hours seems to have stopped it falling over as much if atall.

RaDaR

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×