Well the script was implied - the command I mentioned just mails the backup file to you -- and that whole command line could easily be placed at the bottom of a shell / perl script.
A shell script would probably work fine. Note that you want to test the script and make sure that it doesn't take up too much CPU for too long, or it might get killed.
A shell script would be perfectly adequate, but it's really whatever you're most comfortable in (ie the only reason to write it in perl is if you know perl well).
Something like this should work (untested) #!/bin/sh
# this assumes GNU tar # backup all files except for Maildir/ (add other patterns to --exclude as # needed, or use -X file and put a list of excluded patterns in this file
DATE=`date "+%Y-%m-%d%n"`
/usr/bin/tar czf $HOME/backup-$DATE.tar.gz --exclude=Maildir\* $HOME # replace user@example.com with your email address obviously /usr/bin/mutt -a $HOME/backup-$DATE.tar.gz -s "Backups for $DATE" -F /dev/null user@example.com
|