BCDevOps / backup-container

A simple container for a simple backup strategy.
Apache License 2.0
42 stars 56 forks source link

Messages not being delivered by the webhook logging when the message contains double quotes #95

Closed WadeBarnes closed 1 year ago

WadeBarnes commented 1 year ago

In the following example the error message does not get posted to the rocket.chat webhook endpoint as expected due to the double quotes in the message, specifically in "base/16386/3897249", not being properly url encoded before being sent.

Verifying backup ...

Settings:
- Database: event-db-primary:5432/bc_reg_db
- Backup file: /backups/daily/2022-12-26/event-db-primary-bc_reg_db_2022-12-26_01-00-00.sql.gz

Already clean ...

waiting for server to start....................................................
The server started in 0h:0m:52s.

Restoring from backup ...
waiting for server to shut down.... done
server stopped
Cleaning up ...

[!!ERROR!!] - Backup verification failed: /backups/daily/2022-12-26/event-db-primary-bc_reg_db_2022-12-26_01-00-00.sql.gz

The following issues were encountered during backup verification;
Restoring '/backups/daily/2022-12-26/event-db-primary-bc_reg_db_2022-12-26_01-00-00.sql.gz' to '127.0.0.1/bc_reg_db' ...

PANIC: could not fsync file "base/16386/3897249": No space left on device
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
connection to server was lost

Restore failed.

Elapsed time: 0h:43m:9s - Status Code: 2

Observed behavior:

Expected behavior:

WadeBarnes commented 1 year ago

Manual testing was performed to ensure the webhook logging functioned for the reported case as well as existing info and error causes.

Built and deployed new container into affected environment. Running a verification to recreate the issue and verify the message is sent to the expected RC channel successfully.

WadeBarnes commented 1 year ago

Testing complete. The error message was posted as expected: image