Reputation: 1601
I've try to load a dump to a new database and all seems to work :
user@vpsXXXX:~$ pg_dump -U user -d database < mydump.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.6 (Ubuntu 10.6-0ubuntu0.18.04.1)
-- Dumped by pg_dump version 10.6 (Ubuntu 10.6-0ubuntu0.18.04.1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
--
-- PostgreSQL database dump complete
--
When I look the tables on a software like Postico, there is no tables except the Postgres ones. My dump is complete when I look the SQL file.
Do you know a tip to know what happens ?
Thanks !
Upvotes: 0
Views: 273
Reputation: 42040
Dump and restore operations are best performed as postgres
user. The easiest way to achieve this is to become the postgres
UNIX user.
The initial command had the mistake of confusing pg_dump
with psql
.
Upvotes: 1