I want to backup my whole linux server but where do i --exclude=proc --exclude=sys --exclude=dev/pts --exclude=/var/backups . Please help!!!
Here is my code. I may also have some errors in it. Feedback is welcome.....
#!bin/bash
#Purpose = Backup of var directory
TIME=`date +"%b-%d-%y"` # This Command will add date in Backup File Name.
FILENAME="backup-$TIME.tar.gz" # Here i define Backup file name format.
SRCDIR="/ " # Location of Important Data Directory (Source of backup).
DESDIR="/var/backups/fullbackup" # Destination of backup file.
LOGSYS="/var/log/fullbackup" #Log files of the backup.
echo "Starting backup of $SRCDIR to $DESDIR on $TIME" >> ${LOGSYS}
tar -cpzf $DESDIR/$FILENAME $SRCDIR
echo "Ending backup of $SRCDIR on $TIME" >> ${LOGSYS}
#END