mojira.dev
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.

Attachments

Comments 48

38 more comments

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.

 

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

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

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

foxynotail

(Unassigned)

Confirmed

Retrieved