mojira.dev

IllegalOtter

Assigned

No issues.

Reported

No issues.

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.