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

    Configuration Export

    Scheduled Pinned Locked Moved
    Feature Request
    3
    5
    1.4k
    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.
    • Wayne WorkmanW
      Wayne Workman
      last edited by

      Can the exported .sql file be named with the version/revision?

      For example,

      FOG 1.2.0 would be named fog_backup_1.2.0.sql

      FOG r3333 would be named fog_backup_r3333.sql

      Extra credit:
      Can the date be included, too? fog_backup_r3333_4-30-2015.sql

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
      Daily Clean Installation Results:
      https://fogtesting.fogproject.us/
      FOG Reporting:
      https://fog-external-reporting-results.fogproject.us/

      1 Reply Last reply Reply Quote 0
      • JunkhackerJ
        Junkhacker Developer
        last edited by

        the date seems more practical (and slightly easier) than the version to me. you should probably have records of what version you of software you were running for a given time-frame anyway.

        signature:
        Junkhacker
        We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

        1 Reply Last reply Reply Quote 0
        • Wayne WorkmanW
          Wayne Workman
          last edited by

          A new chunk that impliments the date for configuration save.

          [CODE]fog/lib/fog/ReportMaker.class.php[/CODE]

          chunk edited:

          [CODE]{
          date_default_timezone_set(‘America/Chicago’);
          $current_date = date(‘m/d/Y == H:i:s’);
          $filename=“fog_backup_”.$current_date.“.sql”;
          $path=BASEPATH.‘/management/other/’;
          exec(‘mysqldump --opt -u’.DATABASE_USERNAME.’ -p"‘.DATABASE_PASSWORD.’" -h’.preg_replace(‘#p:#’,‘’,DATABASE_HOST).’ ‘.DATABASE_NAME.’ > '.$path.$filename);
          header(‘X-Content-Type-Options: nosniff’);
          header(‘Strict-Transport-Security: max-age=16070400; includeSubDomains’);
          header(‘X-XSS-Protection: 1; mode=block’);
          header(‘X-Frame-Options: deny’);
          header(‘Cache-Control: no-cache’);
          header(‘Content-Type: application/octet-stream’);
          header(‘Content-Disposition: attachment; filename=’.$filename);
          readfile($path.$filename);
          exec('rm -rf '.$path.$filename);
          }[/CODE]

          Tested working on r3333

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
          Daily Clean Installation Results:
          https://fogtesting.fogproject.us/
          FOG Reporting:
          https://fog-external-reporting-results.fogproject.us/

          1 Reply Last reply Reply Quote 0
          • Wayne WorkmanW
            Wayne Workman
            last edited by

            also,

            this file:
            [CODE]/fog/lib/fog/System.class.php[/CODE]

            Contains the FOG version.

            I was trying to use “include_once” to try to make it work in ReportMaker.class.php but I totally screwed it up.

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
            Daily Clean Installation Results:
            https://fogtesting.fogproject.us/
            FOG Reporting:
            https://fog-external-reporting-results.fogproject.us/

            1 Reply Last reply Reply Quote 0
            • Tom ElliottT
              Tom Elliott
              last edited by

              If you’re trying to just add version, it at that point has already loaded System.class.php. All you’d need to do is append the FOG_VERSION to the file name. But scufa doesn’t always change even though it does always ask to check. Maybe date is better option as even if you revert the newer items are likely not read anymore.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              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

              162

              Online

              12.1k

              Users

              17.3k

              Topics

              155.4k

              Posts
              Copyright © 2012-2024 FOG Project