Fogbackup.sh Fails on SQL database



  • Fogbackup.sh task failed this weekend with an error on the sql export.

    ‘Could not create/download sql backup file.’

    I was able to successfully export the sql database from the web GUI and also manually in MySql. I am not sure what would be causing the hangup within the script though. I am on trunk.


  • Developer

    @FallingWax Ok, now I see what’s wrong here. Thanks for reporting this issue. Moved your post to bug reports.

    When changing the way FOG exports the DB we obviously missed out on fixing the backup script as well. No one reported yet so we didn’t notice until now.

    You can edit that script and exchange line 74 which starts like wget ... with the following call:

    wget --no-check-certificate -O O $backupDir/mysql/fog.sql "http://$ipaddress/$webroot/maintenance/backup_db.php" --post-data="type=sql&fogajaxonly=1" 2>>$backupDir/logs/error.log 1>>$backupDir/logs/progress.log 2>&1
    

    This is until we fixed this in the official code… @Tom-Elliott Mind having a look if this call is about right?



  • @sebastian-roth
    Running Version 1.5.0-RC-9
    SVN Revision: 608

    PHP Fatal error: Uncaught Error: Cannot access self:: when no class scope is active in /var/www/html/fog/management/export.php:30\nStack trace:\n#0 {main}\n thrown in /var/www/html/fog/management/export.php on line 30


  • Developer

    @FallingWax Sorry for the delay. Can you please let us know which version exactly you are running? “trunk” can mean many different things. See in the blue cloud on the web UI.

    Do you see an error in the apache log when running the backup script? See my signature on where to find the error log on your FOG server.



  • @sebastian-roth No problem with disk space. I commented out the sql database backup and the report backup and ran the script with no problems. So its backing up the snapins and images fine. This was working previously. I have a scheduled task that runs the script on the first Saturday of the month I just updated to trunk last week.


  • Developer

    @FallingWax Enough free disk space available? Run df -h and post output here.


 

423
Online

41.8k
Users

12.4k
Topics

116.6k
Posts