title: Postgresql - pg_dump - no matching schemas were found
body: <p>I'm trying to create a backup from PostgreSQL database, but getting the following error: pg_dump: No matching schemas were found</p>
  
  <p>I'm logged in as root and running the command </p>
  
  <p>pg_dump -f db.dump --format=plain --schema=existing_schema --username=userx --host=localhost databasename</p>
  
  <ol>
  <li>I logged in with userx to psql and tried \dt - this gave me information, that schema with name existing_schema is public.</li>
  <li>I checked \l to see that databasename is the database name.</li>
  <li>Password is correct, otherwise I could not access psql.</li>
  <li>Localhost is correct, checked from running processes. Tried the ip-address of the server also, but in this case pg_admin gave an error about the host address.</li>
  </ol>
  
  <p>Output of \dl:</p>
  
  <pre> 
                    List of relations
  
  Schema |                Name                 | Type  | Owner
  --------+-------------------------------------+-------+-------
   public | existing_schema                    | table | userx
  </pre>