title: variable in scp filename not working?
body: <p>I'm trying to scp a backup tgz file from one server to another every night. The backup script uses the following $date var just fine but when I modify it slightly for scp it breaks:</p>
  
  <pre><code>#!/bin/sh
  date=`date +%Y-%m-%d`
  rbfile=`/backups/$date_00h00.tgz`
  scp $rbfile user@myserverip:
  </code></pre>
  
  <p>But the script dies with the error:</p>
  
  <pre><code>/backups/.tgz: No such file or directory
  </code></pre>
  
  <p>On a side note, I really should switch to rsync for better remote backups - the tgz files are at 3.5GB now. Any recommended tutorials?</p>