I recently created a script that's going to run every single night on my Linux server that would use 'mysqldump' to back up each of our MySQL databases to SQL files and then packaged them as a compressed .TAR files. I know want to send the .TAR file through an email to a remote email server. Here's my raw script so far:
$ cat mysqldbbackup.sql | mailx firstname.lastname@example.org
I know this works but I'm looking for an easier solution. Is there a way, possibly using a Shell script, to send the compressed .TAR file to an outgoing email message?
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!