What you are doing is actually tar'ing the files and then compressing them using gzip. You can tell because you are passing the 'z' flag. I would personally tar/gzip the file first and then rsync it over. Perhaps something like this:
Code:
#!/bin/bash
filename="projects"
backup_dir="/Volumes/DataHD/"
date=`/bin/date "+%Y%m%d"`
# Backup the content
cd ${backup_dir}
tar czvf ${filename}-${date}.tar.gz ${filename}
# Copy the content over
rsync -av -e ssh ${filename}-${date}.tar.gz some_server:/some/location/
As you can see, I like the append the timestamp to files that I backup so that I know when it was created in case I ever needed to restore.
-twantrd