NMDA:Postgres 备份失败,无法连接到数据库“template1”
Summary: NMDA Postgres 备份失败,并出现“无法连接到数据库'模板 1': 无法连接到服务器”
Acest articol se aplică pentru
Acest articol nu se aplică pentru
Acest articol nu este legat de un produs specific.
Acest articol nu acoperă toate versiunile de produs existente.
Symptoms
NetWorker Module for Database Applications (NMDA) Postgres 备份失败,并显示“could not connect to database "template1": could not connect to server"
备份错误:
The command '/usr/bin/nwbackup.sh' did not complete successfully. Exit code: 1. Error: + /usr/local/pgsql/bin/pg_dumpall --file=/nsr/apps/tmp/<random numbers>/<sql script> pg_dumpall: error: could not connect to database "template1": could not connect to server: No such file or directory
Cause
在 Postgres 环境中未正确设置用户凭据。
Resolution
更新 NMDA 备份脚本以包括用户名、数据库名称和 Postgres 服务器 IP 地址。
原文:
#! /bin/sh ( set -x; /usr/local/pgsql/bin/pg_dumpall --file=$OAPP_MOUNT_DIR/<sql script>) rc=$?
修改后的脚本:
#! /bin/sh ( set -x; /usr/local/pgsql/bin/pg_dump -U <user> <database name> -h <Postgres server IP> --file=$OAPP_MOUNT_DIR/gepdba.sql) rc=$?
Proprietăți articol
Article Number: 000220603
Article Type: Solution
Ultima modificare: 13 mar. 2026
Version: 2
Găsiți răspunsuri la întrebările dvs. de la alți utilizatori Dell
Servicii de asistență
Verificați dacă dispozitivul dvs. este acoperit de serviciile de asistență.