Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!


Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 




From the folks who brought you High Rankings!

- - - - -

Cron Job To Email Mysql Backup

  • Please log in to reply
No replies to this topic

#1 piskie


    HR 7

  • Active Members
  • PipPipPipPipPipPipPip
  • 1,098 posts
  • Location:Cornwall

Posted 17 June 2011 - 07:43 AM

I hope someone can please help me to get my Cron Job to work.
I need a Backup of the data from a MYSQL Table to be created and Emailed on a timed basis.
I have been able to get an entire MYSQL Databse backed up, gzipped and Emailed by using this Cron Job:
/usr/bin/mysqldump -ce --user=username_connection --password=xyxyxy username_database | gzip | uuencode cms_`date +\%d`.gz | mail -s 'Data Backup' backup@domain.com

From there it seemed such a simple progression to append the Table "products" to the database;
/usr/bin/mysqldump -ce --user=username_connection --password=xyxyxy username_database_products | gzip | uuencode cms_`date +\%d`.gz | mail -s 'Data Backup' backup@domain.com

However, that just results in an empty file being created and sent.
Has anyone please got any suggestions as to how this can be achieved.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

We are now a read-only forum.
No new posts or registrations allowed.