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 email@example.com
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?