Riveran
@Riveran
Astartes

Как сделать дамп удалённой базы данных postgresql?

Есть удалённая база данных, я знаю адрес на котором она находится юзернейм и юзерпассворд, как я могу скопировать эту базу и перенести её на свою локальную базу?

Пишу такой дамп
pg_dump -h 193.122.1.173:34426 -U postgres -F p -f /test/dumploc test-qa

но мне в ответ выдаёт следующее

pg_dump: [archiver (db)] connection to database "test-qa" failed: could not translate host name "193.122.1.173:34426" to address: nodename nor servname provided, or not known
  • Вопрос задан
  • 448 просмотров
Решения вопроса 1
pg_dump -h 193.122.1.173 -p 34426 -U postgres -F p -f /test/dumploc test-qa
Ответ написан
Комментировать
Пригласить эксперта
Ответы на вопрос 1
@mezhuev
Системный администратор
man pg_dump:
-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.

-p port
--port=port
Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.
Ответ написан
Комментировать
Ваш ответ на вопрос

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

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