fix(DatabaseBackupJob): escape PostgreSQL password in backup command (#5759)
This commit is contained in:
parent
d8185e3d6a
commit
edb4e60478
1 changed files with 1 additions and 1 deletions
|
|
@ -390,7 +390,7 @@ private function backup_standalone_postgresql(string $database): void
|
||||||
$commands[] = 'mkdir -p '.$this->backup_dir;
|
$commands[] = 'mkdir -p '.$this->backup_dir;
|
||||||
$backupCommand = 'docker exec';
|
$backupCommand = 'docker exec';
|
||||||
if ($this->postgres_password) {
|
if ($this->postgres_password) {
|
||||||
$backupCommand .= " -e PGPASSWORD=$this->postgres_password";
|
$backupCommand .= " -e PGPASSWORD=\"{$this->postgres_password}\"";
|
||||||
}
|
}
|
||||||
if ($this->backup->dump_all) {
|
if ($this->backup->dump_all) {
|
||||||
$backupCommand .= " $this->container_name pg_dumpall --username {$this->database->postgres_user} | gzip > $this->backup_location";
|
$backupCommand .= " $this->container_name pg_dumpall --username {$this->database->postgres_user} | gzip > $this->backup_location";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue