This is a tar backup script for full backup.
Code:
#!/bin/bash
DATE=`date +"%Y%m%d"`
BACKUP_DIR=/_work/_backup
SOURCE_DIR=/var/www/html/dm
tar -g ${BACKUP_DIR}/html_full_bak_${DATE}.list -W zcvpf ${BACKUP_DIR}/html_full_bak_${DATE}.tgz ${SOURCE_DIR}/ --exclude ${SOURCE_DIR}/data
And the result is here.
Quote:
[root:localhost:~/backup_script]# ./full_backup.sh
tar: You must specify one of the `-Acdtrux' options
Try `tar --help' or `tar --usage' for more information.
|
Any help would be appreciated.