• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Fogbackup.sh Fails on SQL database

    Scheduled Pinned Locked Moved Unsolved
    FOG Problems
    2
    6
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • FallingWaxF
      FallingWax
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

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

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        FallingWaxF 1 Reply Last reply Reply Quote 0
        • FallingWaxF
          FallingWax @Sebastian Roth
          last edited by

          @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.

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by

            @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.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            FallingWaxF 1 Reply Last reply Reply Quote 0
            • FallingWaxF
              FallingWax @Sebastian Roth
              last edited by

              @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

              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by

                @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?

                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post

                203

                Online

                12.0k

                Users

                17.3k

                Topics

                155.2k

                Posts
                Copyright © 2012-2024 FOG Project