Make "quiet" option really quiet

  • William Hooper

    William Hooper - 2012-01-12

    Hey everyone,

    First off, thanks for the automysqlbackup script.  It is very useful.

    Anyway, I just upgraded to version 3.0 rc6 and had a question.  I've set the the conf file option "CONFIG_mailcontent='quiet'", but now I get e-mailed by cron when the script runs:

    Parsed config file "/etc/automysqlbackup/automysqlbackup.conf"

    # Checking for permissions to write to folders:
    base folder /backups … exists … ok.
    backup folder /backups/<configfile> … exists … writable? yes. Proceeding.

    Could there be an edit to make the "quiet" option really quiet?  Shouldn't this information follow the mailcontent option (if log is set, include it in the log e-mail, if stdout is set send it to stdout, if quiet is set, don't print it because it's not an error)?

  • PittaGurneyi

    PittaGurneyi - 2012-01-12

    Well what should I do until the config file is read, therefore the option quiet set and I can establish the output redirections to logfiles, for which I need to make sure, that the directories are there?

    Just run the command with &>/dev/null to get rid of all output. If there is something wrong you'll still get emails … i guess.

    Is this a satisfying solution for you?

  • William Hooper

    William Hooper - 2012-01-16

    I haven't looked at the code but I assumed that the first line "Parsed config file" would be printed after the config files were read, not before.  I was also confused that it did't report parsing the log file being passed by the command line argument.

    I'm currently using the redirect work around, thanks for pointing that out, though.  Even if I did have the CONFIG_mailcontent set to "log" or "files" I wouldn't want two e-mails, one from cron and one from automysqlbackup itself.  I had been using version 2.5 and it didn't send anything to an output that cron would catch.

  • letzter3

    letzter3 - 2012-05-05

    Hi, this is my command.

    root@ptLWL01:/etc/cron.daily# cat runautomysqlbackup
    /usr/local/bin/automysqlbackup /etc/automysqlbackup/myserver.conf
    #chown root.root /home/backup/db* -R
    #find /home/backup/db* -type f -exec chmod 400 {} \;
    #find /home/backup/db* -type d -exec chmod 700 {} \;

    Where I have to put &>/dev/null ?


  • William Hooper

    William Hooper - 2012-05-10

    You would want it on the line that runs automysqlbackup, so:

    /usr/local/bin/automysqlbackup /etc/automysqlbackup/myserver.conf  &>/dev/null

    In my case I haven't seen the need for the ampersand, so my command line is:

    /usr/local/bin/automysqlbackup /etc/automysqlbackup/myserver.conf > /dev/null
  • Ze

    Ze - 2012-07-05


    A real quiet option is for sysadmin who used symbolic link to automysqlbackup script in /etc/cron.daily and don't want to maintain a script where the only task is to redirect output to /dev/null .. it's realy usefull.



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks