@bond_1013
Начинающий веб-разработчик

Как сделать дамп postgresql?

Пытаюсь сделать дамп бд но возникают ошибки:
pg_dump: [archiver (db)] connection to database "mydb" failed: could not connect to server: Connection refused
        Is the server running on host "0.0.0.0" and accepting
        TCP/IP connections on port 5432?

Запрос:
pg_dump -h 0.0.0.0 -U mydb -F c -f dump.tar.gz mydbuser
  • Вопрос задан
  • 124 просмотра
Решения вопроса 1
ky0
@ky0
Миллиардер, филантроп, патологический лгун
Что это у вас за айпишник такой? Если сервер находится на той же машине, с которой делается дамп - юзайте 127.0.0.1 или через unix-сокет подключайтесь:

-h host
--host=host

Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы