Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

runmysqlbackup cron

Help
2012-07-06
2013-05-29
  • Hi,
    after installation the script runs fine with manual launch like 'automysqlbackup /etc/automysqlbackup/myserver.conf'
    However once put in cron.daily, the typical runmysqlbackup create errors.
    testing the file via 'sh runmysqlbackup' gets (note, I call mine mysql_backup_v3 -symlink- and target run_mysql_backup withconf file agrserver.conf):

    root@203-174-87-130:/etc/cron.daily# sh mysql_backup_v3
    : not foundp_v3: 2:
    Parsed config file "/etc/automysqlbackup/automysqlbackup.conf"
    # Checking for permissions to write to folders:
    base folder /var/backup … does not exist. Exiting.
    "ote: Unreadable config file "/etc/automysqlbackup/agrserver.conf
    Error: No basedir found, i.e.
    /usr/local/bin/automysqlbackup: line 835: 6: Bad file descriptor
    /usr/local/bin/automysqlbackup: line 836: 7: Bad file descriptor
    Skipping normal output methods, since the program exited before any log files could be created.
    : not foundp_v3: 4:
    : not foundp_v3: 5:

    Note also that backup file in my server are in /backup/ and i edited the runmysqlbackup file accordingly.
    I also tried by only keeping the minimum script:

    /usr/local/bin/automysqlbackup /etc/automysqlbackup/agrserver.conf
    

    I always get the same errors launching the file manually while running manually

    automysqlbackup /etc/automysqlbackup/myserver.conf
    

    works well.

    I created the 'backup' fdir in /var seems the script still wants it… and this time, it creates folders but still generates errors while manual cmd runs properly….

    EXECUTE CRON.DAILY FILE ###################### ERRORS!

    root@203-174-87-130:/root# sh run_mysql_backup.sh
    : not foundackup.sh: 2:
    Parsed config file "/etc/automysqlbackup/automysqlbackup.conf"
    # Checking for permissions to write to folders:
    base folder /var/backup ... exists ... ok.
    backup folder /var/backup/db ... exists ... writable? yes. Proceeding.
    checking directory "/var/backup/db/daily" ... exists.
    checking directory "/var/backup/db/weekly" ... exists.
    checking directory "/var/backup/db/monthly" ... exists.
    checking directory "/var/backup/db/latest" ... exists.
    checking directory "/var/backup/db/tmp" ... exists.
    checking directory "/var/backup/db/fullschema" ... exists.
    checking directory "/var/backup/db/status" ... exists.
    # Testing for installed programs
    WARNING: Turning off multicore support, since pigz isn't there.
    mysql ... found.
    mysqldump ... found.
    " Parsing databases ... Note: Unreadable config file "/etc/automysqlbackup/agrserver.conf
    Error: The mysql server is empty, i.e. no databases found. Check if something is wrong. Exiting.
    ###### WARNING ######
    Errors reported during AutoMySQLBackup execution.. Backup failed
    Error log below..
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    : not foundackup.sh: 4:
    : not foundackup.sh: 5:
    

    MANUAL ################################### ok !

    root@203-174-87-130:/root# automysqlbackup /etc/automysqlbackup/agrserver.conf
    Parsed config file "/etc/automysqlbackup/automysqlbackup.conf"
    # Checking for permissions to write to folders:
    base folder / ... exists ... ok.
    backup folder /backup ... exists ... writable? yes. Proceeding.
    root@203-174-87-130:/root#
    

    What is wrong in my settings?