I run a web hosting company, and I'm wondering how I can use cPanel's Cron Jobs so that a copy of my entire home directory and a copy all of my MySQL databases can be compressed and emailed to me. I know nothing about Linux, Unix, or whatever that thing with the penguin is called.
I am a hosting reseller account, so it was automatically installed for me.
I did some Linux research online, and I found out how to compress the contents of my public_html directory. Now I just need to figure out how to send that file to my email and then delete the file off of the server.
Here's the command I used for compressing my public_html directory
date=`date -I` ; tar -zcf backup_$date.tgz ./public_html
Also, how does that SQL thing work, and how do I change the script to fit my needs?
Run the uuencode, see if you get any thing like this:
/usr/bin/uuencode
Try `uuencode --help' for more information.
Next try mailx the same way. You use 'mail' instead of mailx. I think. I'll have to test. If you get 'command not found' error, then either it's not installed or it's /usr/bin is not in your path. Do
It worked with mutt, and I was able to finish the job by using the rm command to remove the file once it was sent to me via email. Now, how do you do the MySQL backup?