From dc4efcf44bd600b93c57c8f32a754d560dacbfc2 Mon Sep 17 00:00:00 2001 From: caylakpenguen Date: Sat, 6 Aug 2016 21:10:19 +0300 Subject: [PATCH] =?UTF-8?q?Mysql=20Db=20listesi=20olusturma=20k=C4=B1sm?= =?UTF-8?q?=C4=B1=20eklendi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mysql_Yedekle.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Mysql_Yedekle.sh b/Mysql_Yedekle.sh index dd71e72..278bf60 100755 --- a/Mysql_Yedekle.sh +++ b/Mysql_Yedekle.sh @@ -57,10 +57,16 @@ dondur(){ sleep 1 } +# Mysql Dblerini listele. +listele(){ +find /var/lib/mysql/ -type d | cut -d. -f1 | cut -d/ -f5 | sort | grep -v "mysql" >$BCKDIR/liste.txt +cp $BCKDIR/liste.txt $BCKDIR/liste`date +%F`.txt +} yedek(){ # yedekleme islemi icin. dondur cd $BCKDIR + listele mkdir -p backup.00 touch backup.00 date > $BCKDIR/backup.00/$(date +%F-%H-%M).txt @@ -75,8 +81,11 @@ echo " Merhaba Patron $(date +%F) tarihli MySQL yedekleme islemi tamamlandi. iyi calismalar dileriz. Tarih: $(date) ++--------------+ +DB listesi ++--------------+ " >$BCKDIR/bilgi.txt - +cat $BCKDIR/liste.txt >>$BCKDIR/bilgi.txt mail -s "Mysql Yedekleme" info@kimgelir.com <$BCKDIR/bilgi.txt