#!/bin/sh # scimanse.sh # author....: zogs # email.....: zogs@anche.no # project...: studies related to shell scripting # title.....: simple backup dir with tar and date inclusion # # http://www.autistici.org/c0de # bck_date="backup-%(date '+%d-%m-%y').tar.gz" # setting the name of your backup with # date inclusion dir_data="/var/www/apache/htdconf" # dir where you have files for backuping dir_bck="/mnt/pendrive" # setting pendrive device for your backup # change /mnt/pendrive with /cdrom or # /home/backup or what you want. echo " Starting compression and backup of $dir_data..." tar zcvf $dir_bck/$bck_date $dir_data echo " Finish compression and backup of $dir_data." echo "You can find your backup: $dir_bck."