Skip to content

several enhancements and improvements to the existing backup script#10

Open
jpfir wants to merge 3 commits intothias:masterfrom
jpfir:master
Open

several enhancements and improvements to the existing backup script#10
jpfir wants to merge 3 commits intothias:masterfrom
jpfir:master

Conversation

@jpfir
Copy link

@jpfir jpfir commented Sep 8, 2023

  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.

Juan Pablo Firrincieli and others added 3 commits September 8, 2023 16:45
…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.
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.

1 participant