#!/bin/sh
#This tars up the files directory into files.tar.gz tarball.
/bin/tar -zcpf /files/files.tar.gz /files

#This creates a directory with the date and transfers the files.tar.gz tarball.
cat /files/files.tar.gz |ssh rembackup@192.168.0.5 "mkdir `date "+%d-%m-%y"`; cd `date "+%d-%m-%y"`; cat > files.tar.gz"

#This removes the local files.tar.gz tarball to reduce clutter.
rm /files/files.tar.gz

