If you have a newer version of s3cmd
, try the --quiet
(or -q
) option:
MAILTO=my@email.address 01 03 * * * s3cmd sync --quiet /root/backup/backups/ s3://somebucket/
If not, just redirect STDOUT
to /dev/null
like this:
MAILTO=my@email.address 01 03 * * * s3cmd sync /root/backup/backups/ s3://somebucket/ >/dev/null
Errors are sent to STDERR
, so they will still be emailed.
UPDATE About S3CMD and STDERR:
As Valguss noted, s3cmd always logs debug messages, information, warnings, and error messages before STDERR
, so the above methods will not work.
However, the level of detail can be controlled from the .s3cfg
file (located in the home directory for the user associated with the cron job in this case):
[default] verbosity = ERROR
The ERROR
granularity cannot be configured using command line options at this time.
source share