Menu

Bug Backup screen

2024-02-20
2024-02-29
  • Ana María  Gutiérrez González

    Hi.
    I have detected a strange value on the backup management screen. I see that in the information about available space, HB is indicated, I suppose it is an error where the H should be a G.
    Thank you, it is not an invalidating error, I just wanted to contribute.

     
  • Pierre Goiffon

    Pierre Goiffon - 2024-02-28

    Hello,

    The message is generated in datamodels/2.x/itop-backup/status.php with the bkp-free-disk-space dict key.

    The unit isn't part of the dict key, but is generated by SetupUtils::HumanReadableSize.
    HB is the latest unit available, after PB.
    PB is the right synonym for petabyte (https://en.wiktionary.org/wiki/petabyte)
    But next unit should be exabyte with the EB synonym (https://en.wiktionary.org/wiki/exabyte)

    I've added a bug in our internal system, reference N°7302
    Thanks for the report !

     

    Last edit: Pierre Goiffon 2024-02-28
  • Pierre Goiffon

    Pierre Goiffon - 2024-02-29

    I guess you don't have so much disk space available :/

    Can you create a new php script on your server in the iTop root dir, with the following content, and process it with your browser ?

    <?php
    
    /**
     * Loading datamodel to be able to use auth, as we don't want to expose the disk structure publicly
     */
    require_once('approot.inc.php');
    try {
        require_once(APPROOT.'/application/startup.inc.php');
    } catch (Exception $e) {
        echo <<<EOF
    No valid installation found, cannot continue !<br>
    If you need to check that PHP is running, use <a href="phpcheck.php">phpcheck.php</a>
    EOF;
        die(-1);
    }
    require_once(APPROOT.'/application/loginwebpage.class.inc.php');
    LoginWebPage::DoLogin(true);
    
    
    
    /**
     * Copy of \SetupUtils::CheckDiskSpace with debug outputs
     */
    $sBackupDir = realpath(APPROOT.'data/backups/');
    $sDir = $sBackupDir;
    while(($f = @disk_free_space($sDir)) == false)
    {
        if ($sDir == dirname($sDir)) break;
        if ($sDir == '.') break;
        echo "dir=$sDir\n";
        $sDir = dirname($sDir);
    }
    echo 'result is:';
    var_dump($f);
    
     

Log in to post a comment.