Backup Em Fita

  • Uploaded by: Anonymous xEKsRmtjO
  • 0
  • 0
  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Backup Em Fita as PDF for free.

More details

  • Words: 142
  • Pages: 1
# /bin/sh dia=`date +%a` file_log="/dados/log/Backup-$dia.log" touch $file_log data_ini=`date +%d/%m/%Y-%H:%M` echo "Backup iniciado em $data_ini " > $file_log echo "Status da Fita...." >> $file_log mt -f /dev/st0 status >> $file_log echo "Apagando a fita..." >> $file_log mt -f /dev/st0 erase >> $file_log echo "----------------------------------------------" >> $file_log echo "Copiando arquivos..." >> $file_log tar -cv -T /dados/scripts/dir_server -f /dev/st0 >> $file_log echo "----------------------------------------------" >> $file_log data_fim=`date +%d/%m/%Y-%H:%M` echo "Backup concluido em $data_fim " >> $file_log mt -f /dev/st0 rewind mt -f /dev/st0 eject ############################ # Envia e-mail notificando # ############################ echo "From: root" >/tmp/message echo "To: [email protected]">>/tmp/message echo "Subject: [Backup] $data_ini">>/tmp/message echo " ">>/tmp/message echo "Segue em anexo o log do backup de $data_ini" >>/tmp/message echo "terminado em $data_fim" >>/tmp/message rm -f /tmp/back.zip zip /tmp/back.zip $file_log uuencode /tmp/back.zip back.zip >>/tmp/message exec cat /tmp/message<<EOF| /usr/lib/sendmail -i -t -B8BITMIME sleep 5 rm -f /tmp/back.zip rm -f /tmp/message

Related Documents

Backup Em Fita
June 2020 2
Cachecol Fita
November 2019 10
Backup
April 2020 27
Backup
October 2019 36
Backup
November 2019 29
Backup
June 2020 24

More Documents from ""