title: Postgres database backup error - special character in password
body: <p>I'm trying to take a PostgreSQL backup with <code>pg_dump</code>. But I'm not able to take it due to the following error.</p>
  
  <p>I have successfully taken backups for different IP addresses <strong>without</strong> the special character <code>@</code> in it.</p>
  
  <p><strong>command used and working</strong></p>
  
  <pre class="lang-bash prettyprint-override"><code>sudo /usr/bin/pg_dump --file "/home/myusername/my_first_db.backup" \
    --verbose --format=t --blobs -v \
    --dbname postgresql://postgres:myfirstpassowrd@112.112.113.114:5432/my_first_db
  </code></pre>
  
  <p><strong>command used and not working</strong></p>
  
  <pre class="lang-bash prettyprint-override"><code>sudo /usr/bin/pg_dump --file "/home/myuser/xyz_db/DB_BACKUP/db_file.backup" \
    --verbose --format=t --blobs -v  \
    --dbname postgresql://111.222.333.444:5432/prod_live?password=123th@123th4&amp;user=postgres
  
  sudo /usr/bin/pg_dump --file "/home/myuser/xyz_db/DB_BACKUP/db_file.backup" \
    --verbose --format=t --blobs -v  \
    --dbname postgresql://111.222.333.444:5432/prod_live?password=123th%40123th4&amp;user=postgres
  </code></pre>
  
  <p><strong>Error I'm getting:</strong></p>
  
  <pre class="lang-text prettyprint-override"><code>[4] 8555
  myuser@myuser:~$ pg_dump: [archiver (db)] connection to database "prod_live" failed: FATAL:  password authentication failed for user "root"
  FATAL:  password authentication failed for user "root"
  </code></pre>
  
  <p>I cannot change the password, because it is production.</p>