I have the following one-line
cron command set up which gives me a nice simple message in the body of the email upon backup complete (thanks to @steeldriver).
tar -cpzf /home/user/backups/backup_files.tar.gz /home/user/public_html; case $? in 0) echo "Files successfully backed up at $(date)" ;; *) echo "Backup failed" ;; esac
The issue is that the whole command line is output into the subject line of my email. This is not ideal as it gives the entire path to my backups across email. I'd prefer the subject to just say something simple like, "Backup user"
Is there a way to do this without upsetting the existing command? Thanks.