我想备份我的整个linux服务器,但我在哪里--exclude = proc --exclude = sys --exclude = dev / pts --exclude = / var / backups。 请帮忙!!!
这是我的代码。我可能也有一些错误。欢迎反馈.....
#!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