Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backups] Fix database dump error reporting #3175

Merged
merged 2 commits into from Apr 4, 2023

Conversation

Akkadius
Copy link
Member

@Akkadius Akkadius commented Apr 2, 2023

What

This PR fixes an issue where database dumps would not bubble stderr from the underlying process execution. Currently this pipes stderr to stdout so we don't miss errors, this could be later improved to hold a response object containing status stderr and stdout

This is to prevent server operators from experiencing any sort of data loss if they are missing a table that the database backup is trying to request explicitly. If a table is missing, mysqldump will normally stop.

We could ignore this but this really is something that should be addressed immediately otherwise it could cause worse pain to ignore.

image

  • We now cleanup SQL files after compression is requested and a compression binary is found
  • When a mysqldump error is detected, the world process is exited forcefully
  • Added file utility File::GetContents(file_name)

image

@Akkadius Akkadius merged commit 3e30e78 into master Apr 4, 2023
2 checks passed
@Akkadius Akkadius deleted the akkadius/database-dump-fixes branch April 4, 2023 05:14
@Aeadoin Aeadoin mentioned this pull request Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants