I'm trying to create a backup from PostgreSQL database, but getting the following error: pg_dump: No matching schemas were found
I'm logged in as root and running the command
pg_dump -f db.dump --format=plain --schema=existing_schema --username=userx --host=localhost databasename
Output of \dl:
List of relations Schema | Name | Type | Owner --------+-------------------------------------+-------+------- public | existing_schema | table | userx
The schema's name is public
.
existing_schema
is the name of a table in the schema public.
It's not clear from your pg_dump commandline what you want to do.
If you want to export all tables from the schema public
you need to specify:
--schema=public
If you want to export only the table existing_schema
then you need to specify:
--table=existing_schema