Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View andresams's full-sized avatar
❤️
In a relationship with Magento 2

Andresa Martins andresams

❤️
In a relationship with Magento 2
View GitHub Profile
@andresams
andresams / tinydump
Created January 1, 2018 03:49 — forked from ceckoslab/tinydump
Simple PHP script, that creates a dump of Magento DB with smaller footprint ... the script just excludes the data some of the log tables, but keep the the schema of these tables.
<?php
define('DS', DIRECTORY_SEPARATOR);
function _getExtractSchemaStatement($sqlFileName, $db)
{
$dumpSchema = 'mysqldump' . ' ';
$dumpSchema .= '--no-data' . ' ';
$dumpSchema .= '-u ' . $db['user'] . ' ';
$dumpSchema .= '-p' . $db['pass'] . ' ';
$dumpSchema .= '-h ' . $db['host'] . ' ';