File attachmend using mail command in linux console

Once I take a backup of the database on the server,
I would like to send its gzip file as the file attachment.
Sending the database dump as mail text is not good :wink: for long

Probably the only mailer application installed for console access is mail.

How can I send an attachment using mail command in the console?

uuencode your.gz your.gz | mail recipient@address.com

The first filename is the filename on the sytem, second is the filename as attached

If you don’t have uuencode on your server
yum install sharutils

This saved my time on the test server.
I was wondering if the server has installed it.
And it was possible on a vz child. Not in the parent container.
I installed the cron on the child. Now having fun.

Issue resolved.
Thank you!