# I like keeping a file of the BackUp steps on the server
# and have it sent in an email
needs adjustment, where it says "myLogs
" this is not an existing dir! I just like to have it, in order to keep the logs I generate in a separate folder.
So if you like the name "myLogs
" just do a
Also it may be better to remove the "all_databases.sql" from "/var/www/" by adding one line after the "WWW BackUp" part of the script…
(Have edited this in the above script
### Clean up
# removing the SQL Dump, as it has been put into the "WWW BackUp" by now.
As for "mail: invalid option -- r
"… this is due to the mail system.
Very often the mail system "nail" is is used/installed and a sysmlink is added to the system, so that the mail command is acctually using the program nail.
If you have "nail" installed you'll find withDESCRIPTION
Nail is an intelligent mail processing system, which has a command syntax reminiscent of ed(1) with
lines replaced by messages. It is based on Berkeley Mail 8.1, is intended to provide the functionality
of the POSIX mailx command, and offers extensions for MIME, IMAP, POP3, SMTP, and S/MIME.…
Sets the From address. Overrides any from variable specified in environment or startup files.
Tilde escapes are disabled. The -r address options are passed to the mail transfer agent unless
SMTP is used. This option exists for compatibility only; it is recommended to set the from
variable directly instead.
So if you have nail, but no symlink to it simply use:
>&1 | nail -r "$Email_From" -q "$bakStatus" -s "$Email_Sub" "$Email_To"
or if you have to use "mail", just leave out the " -r "$Email_From" ", as this is sort of cosmetic, allowing you a different Senders address, then your system user name…
Reading a bit about the whole thing may be a good idea, too