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

pg_dump fails when passwords are complex #30743

Open
wezell opened this issue Nov 21, 2024 · 3 comments · Fixed by #30744
Open

pg_dump fails when passwords are complex #30743

wezell opened this issue Nov 21, 2024 · 3 comments · Fixed by #30744

Comments

@wezell
Copy link
Contributor

wezell commented Nov 21, 2024

Parent Issue

No response

Problem Statement

Support is asked once a week to create backups for customers. We have this functionality in the back end but it can fail in some cases.

This is because the pg_dump functionality under the covers creates a url connection to a postgres database and it fails when there are special characters that need to be encoded to be used in a url - for example when a password contains a special characters like these :/+%& .

You can see this breaking in the backend of the new headless site.

This is the same issue as we had with the old pubsub connection #21363

Steps to Reproduce

Create a database user with a password that contains characters like these :/+%& and then try to use the db dump function in the Maintenance > Tools screen in dotCMS. These characters need to be escaped.

Acceptance Criteria

We should be able to dump databases with aplomb!

Steps to Reproduce

  • Start dotCMS with the Empty Starter.
  • Go to the System > Maintenance > TOOLS portlet, inside the Export dotCMS Content section, and click the `Download DB Dump.
  • A .GZ file will be downloaded, with a name similar to this one: default_db_2024-11-22_08-49-29.sql.gz
  • Try to un-compress it, you'll get an error indicating that the file is unable to be expanded.

dotCMS Version

23.x+

Copy link

@jcastro-dotcms
Copy link
Contributor

INTERNAL QA: PASSED ✅

  • Docker Image: trunk_eaa0f2e

The generated dump file can be un-compressed without problem now, exposing the plain .SQL file.

@josemejias11
Copy link
Contributor

Approved: Tested on ** trunk_4f46e9e**, Docker, macOS 14.5, FF v126.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants