#!/bin/bash
DIA=$(
date
+%d )
MES=$(
date
+%b )
ANO=$(
date
+%Y )
FILE=
"${DIA}${MES}${ANO}"
echo
"++++++++++++++++++++++++++"
>>
/var/log/
$FILE.log
echo
" Iniciando o Backup"
>>
/var/log/
$FILE.log
date
>>
/var/log/
$FILE.log
date
>>
/var/log/
$FILE-arquivo.log
tar
-cvf
/dev/st0
/etc
/arquivos
/home
/root
/var
>>
/var/log/
$FILE-arquivo.log
date
>>
/var/log/
$FILE-arquivo.log
echo
"+++++++++++++++++++++++++"
>>
/var/log/
$FILE.log
echo
" Final do Backup"
>>
/var/log/
$FILE.log
date
>>
/var/log/
$FILE.log
mt -f
/dev/st0
eject
mail -s
"Backup Fita DAT"
"admin@seumail.com.br"
<< FIMMAIL
Relatorio de backup
Status ATUAL DO DISCO
`
df
-h`
Relatorio Backup dos ARQUIVOS para Fita DAT
`
cat
/var/log/
$FILE.log`
FIMMAIL