On 5/18/07, jan gestre <[EMAIL PROTECTED]> wrote:
I made a simple script to backup our mysql databases and i have them run as
cronjobs however we want to know the results if it gets backed up
successfully or not.

here is the script:

#!/bin/sh
# Backup the database
#
# change directory to the external drive
cd /media/FreeAgent_Drive/DBbackup/
mysqldump -v database -uuser -ppassword > database.sql

I tried running the script manually and email after it completes the job.

# sh scriptname | mailx [EMAIL PROTECTED]

however the email i got was empty, even if i made it verbose, the email is
still empty.

Your script does not have any output. In your script, you can add a
status message, or, if you have privileges, add log entries to syslog.

Somehow related, here's how I did it for my Wordpress DB:
http://iandexter.net/424/backing-up-wordpress-database

HTH.

--
Ian Dexter R. Marquez
http://iandexter.net | [EMAIL PROTECTED]
http://feeds.feedburner.com/Coredump
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to