title: copy cp using pg_dump + pg_restore, getting error:
body: <p>Here are my commands:</p>
  
  <pre><code>db_conn_str="${db_prefix}@${db_host}/${db_name}"
  
  pg_dump -w --schema-only --clean --create \
     -U dev -d "$db_conn_str" &gt; "$tmp_folder/dev_dump.sql"
  
  psql -h localhost -U postgres -1 -f "$tmp_folder/dev_dump.sql"
  </code></pre>
  
  <p>I am getting this error:</p>
  
  <blockquote>
    <p>pg_dump: error: query failed: ERROR:  permission denied for table
    cp_users </p>
    
    <p>pg_dump: error: query was: LOCK TABLE public.cp_users IN
    ACCESS SHARE MODE</p>
  </blockquote>
  
  <p>does anyone know how to mitigate that error? My goal is to copy a database from a remote db to my local db.</p>