title: Ignoring a table in pg_dump and restore
body: <p>This is what I currently do to copy a database from my local machine to a remote server.</p>
  
  <pre><code>Dump local database:
  pg_dump dbname --clean -U postgres &gt; dumpfile
  
  Restore remote database:
  psql --single-transaction dbname -U postgres &lt; dumpfile
  </code></pre>
  
  <p>This does a <strong>perfect replication</strong>.</p>
  
  <p>How do I modify this to ignore particular table names, both in the source and destination?</p>
  
  <p>This will be useful for tables that log website visits. I want to retain my existing remote visit logs,  while ignoring my local "visit" logs (which is just me visiting my own website locally).</p>