<p>Not an expert</p>

<p><strong>EDIT: Brad is, see his post</strong></p>

<p>From what I have noticed, the difference seems to be merely one of syntax in the way SQL dump are written. Sequel pro is more generic (and also more optimised as Brad explains). Craft creates files that are tailored for Craft and the way it works.</p>

<p>I have used both indifferently and never had any problem, although I tend to go with Craft generated ones lately. </p>

CC BY-SA 3.0
2014-07-15T19:51:01.103Z
lol - I still voted yours up. :)
Brad Bell
CC BY-SA 3.0
2014-07-15T19:51:31.057Z
That's because you're a softy
Jérôme Coupé
CC BY-SA 3.0
2014-07-15T19:10:07.350Z
2014-07-15T19:51:09.090Z
2014-07-15T19:51:09.090Z
Jérôme Coupé
<p>The difference in both size and speed is likely because Sequel Pro (and any other MySQL client) is likely using <a href="https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html">mysqldump</a>, which is a native CLI command and highly optimized.  </p>

<p>Craft can't rely on that for a variety of reasons (PHP might have have <a href="http://php.net/manual/en/function.exec.php">exec</a> permissions, the account Craft uses to connect to the database might not have the permissions necessary to perform a backup, etc.)</p>

<p>So Craft has it's own fallback where it manually analyzes the database's <a href="https://en.wikipedia.org/wiki/Data_manipulation_language">DML</a> and <a href="https://en.wikipedia.org/wiki/Data_definition_language">DDL</a> and writes it out to a file.</p>

<p>Slower?  Yes.  Larger file size?  Yes.  More reliable for Craft?  Yes.</p>

<p>It is on our list somewhere to check if Craft has the ability to access <code>mysqldump</code> and use that, if not fall back to our current method.</p>

CC BY-SA 3.0
2014-07-15T23:01:57.030Z
So with that being said, should I only be using the craft backup method or is the dump out of Sequel Pro fine? I am willing to use the larger/longer method if you think it will help something. Otherwise it's a PITA. :-)
Jacob Graf
CC BY-SA 3.0
2014-07-15T23:04:00.650Z
Feel free to use whatever method you want / are comfortable with.  They both will do the job.
Brad Bell
CC BY-SA 3.0
2014-07-15T19:31:47.227Z
2014-07-15T19:31:47.227Z
Brad Bell
<p>Since I am involved in a multi-developer, version-controlled setup, I do a lot of database importing and exporting from environments.</p>

<p>I notice today that when I export a database from one of our sites using the control panel "Backup Database" function, it comes out at about 3.6MB and takes about 5 minutes to import.</p>

<p>When I export from Sequel Pro, the database dump comes out at about 1.6MB and imports within 30 seconds.</p>

<p>Note, I always dump the existing tables before import.</p>

<p>Just wondering what the difference is here that there is such a difference in file size and import time and which way is best?</p>

<p>Thanks!</p>

<database><multi-environment>
Export database from control panel or Sequel Pro? What's the difference?
# Export database from control panel or Sequel Pro? What's the difference?

(Asked by: username_0 on 2014-07-15)

Since I am involved in a multi-developer, version-controlled setup, I do a lot of database importing and exporting from environments.

I notice today that when I export a database from one of our sites using the control panel "Backup Database" function, it comes out at about 3.6MB and takes about 5 minutes to import.

When I export from Sequel Pro, the database dump comes out at about 1.6MB and imports within 30 seconds.

Note, I always dump the existing tables before import.

Just wondering what the difference is here that there is such a difference in file size and import time and which way is best?

Thanks!

**Tags:** database, multi-environment


---

## 2 answers

### Answer by username_2 on 2014-07-15. Score: 10 | Accepted answer

The difference in both size and speed is likely because Sequel Pro (and any other MySQL client) is likely using [mysqldump](https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html), which is a native CLI command and highly optimized.

Craft can't rely on that for a variety of reasons (PHP might have have [exec](http://php.net/manual/en/function.exec.php) permissions, the account Craft uses to connect to the database might not have the permissions necessary to perform a backup, etc.)

So Craft has it's own fallback where it manually analyzes the database's [DML](https://en.wikipedia.org/wiki/Data_manipulation_language) and [DDL](https://en.wikipedia.org/wiki/Data_definition_language) and writes it out to a file.

Slower? Yes. Larger file size? Yes. More reliable for Craft? Yes.

It is on our list somewhere to check if Craft has the ability to access `mysqldump` and use that, if not fall back to our current method.

> **Comments:**
> **username_0**: So with that being said, should I only be using the craft backup method or is the dump out of Sequel Pro fine? I am willing to use the larger/longer method if you think it will help something. Otherwise it's a PITA. :-)  
> **username_2**: Feel free to use whatever method you want / are comfortable with.  They both will do the job.  

---

### Answer by username_1 on 2014-07-15. Score: 3

Not an expert

**EDIT: Brad is, see his post**

From what I have noticed, the difference seems to be merely one of syntax in the way SQL dump are written. Sequel pro is more generic (and also more optimised as Brad explains). Craft creates files that are tailored for Craft and the way it works.

I have used both indifferently and never had any problem, although I tend to go with Craft generated ones lately.

> **Comments:**
> **username_2**: lol - I still voted yours up. :)  
> **username_1**: That's because you're a softy  

---

