Is there an extension available in the market that can provide information about the size of our Espo CRM, including the database, files, and attachments?
Announcement
Collapse
No announcement yet.
Extension to Determine Size of Espo CRM
Collapse
X
-
Hi,
this is the only one available at the moment:
-
Hi,
i think if some one can make a Extention
i think is better in job.. 1 time / week
Just need to get the path of install of espocrm and maybe bytes to mega conversion can be better
PHP Code:namespace Espo\Custom\Jobs;
use Espo\Core\Job\JobDataLess;
use Espo\Core\ORM\EntityManager;
use Espo\Core\Utils\Log;
use Espo\Core\Utils\Config;
use PDO;
$databaseParams = $this->config->get('database');
$sql = "SELECT table_schema as db, ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) as size
FROM information_schema.tables
where table_schema='{$databaseParams['dbname']}'";
$pdo = $this->em->getPDO();
$sth = $pdo->prepare($sql);
$sth->execute();
$data = $sth->fetch(PDO::FETCH_ASSOC);
$this->log->error($data['db'] .'=>' .$data['size']);
$size = $this->folderSize('/Volumes/macOSData/path/blabla');
$size = round($size/1048576, 1);
$this->log->error($size);
)
PHP Code:private function folderSize (string $dir) : float
{
$size = 0;
foreach (glob(rtrim($dir, '/').'/*', GLOB_NOSORT) as $each) {
$size += is_file($each) ? filesize($each) : $this->folderSize($each);
}
return $size;
}
Comment
-
Look like it been remove or something wrong with their website? I remember seeing 2-3 pages of extension but now there only 1 page left:
Comment
-
Looks like he made an extension package the same day this post was made and removed the extension from being free.
Comment
Comment