title: Simple way to encrypt and decrypt a backup file in bash
body: <p>I need to encrypt a backup file gzip.
  I performed the following operation.,</p>
  
  <pre><code>    tar -Pzcvf  $dir/*.xml &gt;/dev/null | gpg --yes --batch --passphrase PaSsW0rD -o "$bpath/$bfile".tar.gz
  </code></pre>
  
  <p>But it is failing with the following error.,</p>
  
  <pre><code>     gpg: processing message failed: Unknown system error
  </code></pre>
  
  <p>I just need a simple passsord protected backup file. Any other alternative solutions are also welcome.</p>
  
  <p>Thanks in advance</p>