- user : root
- host : grodoudou.seizam.com
- date : 19/06/12 08:38
- curpath : /home/yannouk
[email protected]# cd /root/
[email protected]# chmod 770 mysql-daily-backup.sh
- Edit /root/mysql-daily-backup.sh, see [1]
- Edit /root/mysql-daily-backup.sh, see [2]
[email protected]# chmod 550 mysql-daily-backup.sh
- [1] Edit /root/mysql-daily-backup.sh
--- old 2012-06-19 08:39:39.000000000 +0000
+++ new 2012-06-19 08:40:54.000000000 +0000
@@ -19,3 +19,4 @@
-
+# Mail subject
+mail_subject="[Report] [Grodoudou]";
@@ -100,2 +101,2 @@
chmod -R 500 ${curr_backup_dir};
-mail -s "Backup ${backup_date} report" ${mail} < ${report_file};
+mail -s "${mail_subject} Backup ${backup_date} report" ${mail} < ${report_file};
- [2] Edit /root/mysql-daily-backup.sh
--- old 2012-06-19 09:41:32.000000000 +0000
+++ new 2012-06-19 09:42:41.000000000 +0000
@@ -91,3 +91,4 @@
echo "Now available backups:" >> ${report_file};
-ls -lh ${backup_dir} >> ${report_file};
+du -sh ${backup_dir} >> ${report_file};
+ls -lh ${backup_dir} | grep -v total >> ${report_file};
echo " " >> ${report_file};