Mojira Archive
BDS-2733

Cannot copy MANIFEST and .log during Save Hold. Files are open by bedrock_server.exe

During Save Hold the MANIFEST and .log files from the db folder do not unlock as they should and can not be copied.

I have tried this on 3 separate windows 10 systems on several different worlds including brand new worlds created by the server.

This means we cannot take a working backup of the world without completely shutting down the server.

I have checked permissions and this is not a permissions issue.
See screenshots attached.

This started happening since BDS 1.14.1.4
The Bug tracker will not let me choose this version as it is only showing 1.14.0.9

Very worrying! Requires URGENT attention.

Environment

Windows 10 Home and Windows 10 Pro

Attachments2

BDSSaveIssue.PNG
BDSSaveIssue.PNG

Foxy No-Tail

BDSSaveIssueLOG.PNG
BDSSaveIssueLOG.PNG

Foxy No-Tail

Comments17

Affects 1.14.30
Windows Server 2019 also affected.

Spoke to a hosted server provider who mentioned it doesn’t appear to happen for them on Linux so likely a Windows only bug.

I can confirm this is still an issue in 1.14.30.2 with BDS holding an exclusive lock on the log and manifest files, breaking backups:

The process cannot access the file '<path>\db\005880.log' because it is being used by another process.

The process cannot access the file '<path>\db\MANIFEST-005878' because it is being used by another process.

 

I can also confirm this does not affect Linux, only Windows - I ran my server on Linux first before another bug forced me to switch to Windows. On Linux I did not have this issue, on Windows I do.

Hello! 
Any updates on this ticket? It is now clear that, unfortunately, a fix was not include with 1.16. Maybe I ask if it will be included in a future hotfix? 

Can confirm i'm having this issue as well

 

Hi VouLT,

The bug tracker is predominantly manned by community volunteers so we have no more information than you do.

It has been forwarded to the developers, when and how this is resolved is up to them. We have no way of providing updates unfotunately.

Ionic

Maybe try to run a Linux version on Windows using Windows Subsystem for Linux?

I'd heavily caution against that due to BDS-2574. Linux has seen significant performance issues since 1.16 so admins would be switching one issue for another (imo) worse one.

Running a 1.16.201.02 server and the problem is not happening for me

Why is this being ignored? It would be very helpful if this was fixed!

I am hearing that this bug is fixed in the current version. Is anyone still having problems with save hold not copying all files?

if this wasn't fixed the problem could be that it tries to backup while the server is being saved

Closing as per request on slack. 

I have been using a BDS since 1.18 and have been able to copy the files (via Windows file copy) even when the server is online.

I have seen the issue in BDS "manager clients" that are trying to do online backups. I played around with this myself and found that the issue has to do with an order of operations on how the backup files are being trimmed.  

The user flow that causes the error is specifically:

  • Issue the 'save hold' command
  • Issue the 'save query' command (waiting for the file list to appear)
  • Copy the affected bytes (per the file list) to the backup location
    • Essentially a File.Open is being done and then trying to just File.WriteBytes based on the size from the file list (using C# nomencalture)

This will cause the problem every time, in my experience, because the files are restricting read access because BDS is still reading and writing the files.

The user flow that I found that works is:

  • Issue the 'save hold' command
  • Issue the 'save query' command (waiting for the file list to appear)
  • Copy the ENTIRE file (per the file list) to the backup location
    • I used File.Copy via a C# program to move the file, but a manual Windows file copy should work as well.
  • Now trim each file to the appropriate length (per the file list)
    • Using File.Open and then SetLength on the opened file.

 

could the issue be with your software you made for the sever and not the Mojang software

History10

Xiipher

Deleted comment:

I believe this bug was introduced in 1.14.

IonicEcko

Added affects versions: 1.14.21.0

IonicEcko

Added affects versions: 1.14.30

IonicEcko

Added affects versions: 1.14.32.1

IonicEcko

Added Confirmation Status: Confirmed

user-78f51

Deleted comment:

Can confirm on retail version 1.14.3. This bug should be elevated to a higher priority because of how many players, and servers this affects.

IonicEcko

Added affects versions: 1.16.0

[MCQA] v-magwar
Cannot Reproduce
Foxy No-Tail
134
64
Confirmed
311770
1.14.0.9 - 1.16.01.14.0.9 1.14.21.0 1.14.30 1.14.32.1 1.16.0