several enhancements and improvements to the existing backup script#10
Open
jpfir wants to merge 3 commits intothias:masterfrom
Open
several enhancements and improvements to the existing backup script#10jpfir wants to merge 3 commits intothias:masterfrom
jpfir wants to merge 3 commits intothias:masterfrom
Conversation
…xisting backup script: 1. `set -o pipefail`: The script now starts with the `set -o pipefail` command to ensure proper error handling in pipelines. 2. `DIVIDE_BACKUP`: This new option enables the division of backups into a dump step followed by compression. 3. `PREBACKUP`: Added logic to check for running `mongodump` processes and wait for completion if necessary. 4. Logging Enhancements: Enhanced logging with timestamps for better visibility into the backup process. 5. Log File Management: Log files are moved to a separate directory (`$LOGBACKUPDIR`) for improved organization. 6. Improved Compression Handling: Improved control over `mongodump` and compression processes using a named pipe (`$MONGODUMP_pipe`). 7. Additional Comments: Added comments and descriptive messages for clarity. These enhancements provide better error handling, logging, and control during backups, making the script more robust and informative.
* Prevent ambiguous redirect errors by ensuring FILENAME is set before use. * Add cleanup checks to avoid rm errors when filenames or pipes are unset. * Add config templates to support mongod version 4.2 and 7.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
set -o pipefail: The script now starts with theset -o pipefailcommand to ensure proper error handling in pipelines.DIVIDE_BACKUP: This new option enables the division of backups into a dump step followed by compression.PREBACKUP: Added logic to check for runningmongodumpprocesses and wait for completion if necessary.$LOGBACKUPDIR) for improved organization.mongodumpand compression processes using a named pipe ($MONGODUMP_pipe).