Sorry... the link down.
</etc/cron.daily/backup.sh>
##### Start #####
#!/bin/bash
#
# 7 daily rotating incremental backup using rsync
# written by marvin
# reference :
http://www.mikerubel.org/computers/rsync_snapshots/
unset PATH # suggestion from H. Milz: avoid accidental use of $PATH
# ------------- system commands used by this script --------------------
RM=/bin/rm;
MV=/bin/mv;
CP=/bin/cp;
TOUCH=/bin/touch;
MKDIR=/bin/mkdir;
RSYNC=/usr/bin/rsync;
# ------------- file locations -----------------------------------------
DEST_PATH=/backup;
BCK_PATH=/;
INCLUDES=/etc/backup.data;
# ------------- the script itself --------------------------------------
# rotating snapshots of $BCK_PATH
# create destination directory if not exist
if [ ! -d $DEST_PATH$BCK_PATH ]
then
$MKDIR -p $DEST_PATH$BCK_PATH
fi
# step 1: delete the oldest snapshot, if it exists:
if [ -d $DEST_PATH$BCK_PATH/daily.6 ]
then
$RM -rf $DEST_PATH$BCK_PATH/daily.6
fi
# step 2: shift the middle snapshots(s) back by one, if they exist
let count=5
while [ $count != 0 ]
do
if [ -d $DEST_PATH$BCK_PATH/daily.$count ]
then
$MV $DEST_PATH$BCK_PATH/daily.$count $DEST_PATH$BCK_PATH/daily.$((count+1))
fi
let count=count-1
done
# step 3: make a hard-link-only (except for dirs) copy of the latest snapshot,
# if that exists
if [ -d $DEST_PATH$BCK_PATH/daily.0 ]
then
$CP -al $DEST_PATH$BCK_PATH/daily.0 $DEST_PATH$BCK_PATH/daily.1
fi
# step 4: rsync from the system into the latest snapshot (notice that
# rsync behaves like cp --remove-destination by default, so the destination
# is unlinked first. If it were not so, this would copy over the other
# snapshot(s) too!
$RSYNC \
-va --delete --delete-excluded \
--include-from=$INCLUDES --exclude=** \
$BCK_PATH/ $DEST_PATH$BCK_PATH/daily.0 ;
# step 5: update the mtime of daily.0 to reflect the snapshot time
$TOUCH $DEST_PATH$BCK_PATH/daily.0 ;
##### End #####
</etc/backup.data>
##### Start #####
etc/
etc/exim.conf
etc/named.conf
etc/group
etc/passwd
etc/proftpd.conf
etc/proftpd.passwd
etc/proftpd.vhosts.conf
etc/shadow
etc/system_filter.exim
etc/httpd/
etc/httpd/conf/
etc/httpd/conf/httpd.conf
etc/httpd/conf/ips.conf
etc/mail/
etc/mail/**
etc/virtual/
etc/virtual/**
home/
home/**
usr/
usr/local/
usr/local/directadmin/
usr/local/directadmin/data/
usr/local/directadmin/data/**
var/
var/lib/
var/lib/mysql/
var/lib/mysql/**
var/log/
var/log/**
var/mail/
var/mail/**
var/named/
var/named/**
var/spool/cron/
var/spool/cron/**
var/spool/mail/
var/spool/mail/**
var/spool/virtual/
var/spool/virtual/**
var/www/
var/www/**
##### End #####
Really appreciate if someone could give better idea about backup.data